/**
 * @file css/squads/ui.css
 * @description Styles for the squads list and detail pages.
 */

.squad-list-card {
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 4px 6px -1px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.squad-list-card:hover {
    transform: translateY(-5px);
    border-color: #4f46e5;
    box-shadow: 0 10px 20px -5px rgba(79,70,229,0.2);
}
.squad-card-header h3 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.75rem;
    color: #e2e8f0;
}
.squad-card-header p {
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.25rem;
}
.squad-card-members {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.member-portrait {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #475569;
    object-fit: cover;
    object-position: center;
    transition: all 0.2s ease;
    background-color: #0d1226;
}
.squad-list-card:hover .member-portrait {
    border-color: #a5b4fc;
    transform: scale(1.05);
}
.squad-card-synergies {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.synergy-badge {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}
.pagination-btn {
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
}
.pagination-btn:hover {
    background-color: #2563eb;
}
.pagination-btn.disabled {
    background-color: #1e3a8a;
    cursor: not-allowed;
    opacity: 0.7;
}
.page-indicator {
    font-size: 1.125rem;
    font-weight: 600;
    color: #cbd5e1;
}

.guide-section-title {
    font-family: 'Russo One', sans-serif;
    font-size: 2.25rem;
    color: #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #3b82f6;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.guide-text {
    color: #cbd5e1;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.guide-text p {
    margin-bottom: 1.5rem;
}

.champion-card-enhanced {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #475569;
    background-color: #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3), inset 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
}
.champion-card-enhanced:hover {
    transform: scale(1.05);
    border-color: #818cf8;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    background-color: #0d1226;
}
.card-avatar-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.2s ease-in-out;
}
.champion-card-enhanced:hover .card-avatar-top {
    transform: scale(1.1);
}

.card-content-bottom {
    padding: 1rem;
    text-align: center;
    background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.8));
    flex-grow: 1;
}
.champion-name {
    font-family: 'Russo One', sans-serif;
    color: #e2e8f0;
    font-size: 1.25rem;
}
.champion-class {
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.synergy-breakdown-card {
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid #3b82f6;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}
.synergy-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.synergy-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.synergy-breakdown-card:hover .synergy-icon {
    transform: rotate(15deg) scale(1.1);
}
.synergy-header h3 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.75rem;
    color: #bfdbfe;
}
.synergy-list {
    list-style-type: none;
    padding-left: 0;
    color: #94a3b8;
    space-y: 0.5rem;
}
.synergy-list li {
    padding-left: 1.5rem;
    position: relative;
}
.synergy-list li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #f59e0b;
}

.champion-role-card {
    background-color: rgba(15, 23, 42, 0.7);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid #4f46e5;
}
.champion-role-title {
    font-family: 'Russo One', sans-serif;
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 0.5rem;
}
.champion-role-title span {
    color: #94a3b8;
    font-size: 1.25rem;
    margin-right: 0.5rem;
}
.champion-role-desc {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.skill-tabs-container {
    margin-top: 1rem;
}
.skill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid #334155;
    margin-bottom: 1rem;
}
.skill-tab-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background-color: transparent;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.skill-tab-btn:hover {
    color: #e2e8f0;
}
.skill-tab-btn.active {
    color: #bfdbfe;
    border-bottom-color: #3b82f6;
}

.skill-tab-content {
    display: none;
    padding: 1rem;
    background-color: rgba(13, 18, 38, 0.6);
    border-radius: 0.5rem;
    color: #cbd5e1;
    animation: fadeIn 0.5s;
}
.skill-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.rating-btn {
    background-color: #334155; /* slate-700 */
    color: #94a3b8; /* slate-400 */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    cursor: pointer;
}
.rating-btn:hover:not(:disabled) {
    color: #e2e8f0; /* slate-200 */
    background-color: #475569; /* slate-600 */
}
.rating-btn.active {
    color: white;
}
.rating-btn[data-vote="1"].active {
    background-color: #16a34a; /* green-600 */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}
.rating-btn[data-vote="-1"].active {
    background-color: #dc2626; /* red-600 */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.rating-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.rating-btn i {
    font-size: 1.125rem;
}
.rating-btn span {
    font-size: 0.875rem;
}

.squad-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.squad-card-synergies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.squad-card-ratings {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #cbd5e1;
}
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8; /* slate-400 */
}

.form-input, .form-select {
    width: 100%;
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #334155; /* slate-700 */
    color: #e2e8f0; /* slate-200 */
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
}
.btn-primary:hover {
    background-color: #2563eb;
}
.btn-secondary {
    background-color: #475569;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
}
.btn-secondary:hover {
    background-color: #64748b;
}

#close-modal-btn {
    font-size: 2rem;
    line-height: 1;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-text {
  visibility: hidden;
  width: 240px;
  background-color: #1e293b; /* slate-800 */
  color: #cbd5e1; /* slate-300 */
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 150%;
  left: 50%;
  margin-left: -120px; /* Use half of the width to center */
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
  font-weight: normal;
  line-height: 1.4;
  border: 1px solid #334155; /* slate-700 */
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.creator-card {
    background: rgba(15, 23, 42, 0.7); /* slate-900 with opacity */
    border: 1px solid #3b82f6; /* blue-500 */
    border-radius: 0.75rem; /* 12px */
    padding: 2rem;
    margin-top: 1rem;
    text-align: center;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.1);
}

.creator-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.creator-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #4f46e5; /* indigo-600 */
    object-fit: cover;
    background-color: #0d1226;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
}

.creator-username {
    font-family: 'Russo One', sans-serif;
    font-size: 2rem;
    color: #e2e8f0;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.creator-description {
    color: #cbd5e1; /* slate-300 */
    font-style: italic;
    max-width: 42rem; /* 672px */
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

.creator-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem; /* 20px */
}

.creator-socials a {
    color: #94a3b8; /* slate-400 */
    font-size: 1.75rem; /* 28px */
    transition: all 0.2s ease-in-out;
}

.creator-socials a:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.05);
}

.owner-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 0.75rem;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.status-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-toggle-label {
    font-weight: 600;
    color: #94a3b8; /* slate-400 */
}

#status-text {
    font-weight: 700;
    font-family: 'Russo One', sans-serif;
    letter-spacing: 0.05em;
}

#status-text.active {
    color: #34d399; /* emerald-400 */
}

#status-text.inactive {
    color: #ef4444; /* red-500 */
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151; /* gray-700 */
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #3b82f6; /* blue-500 */
}

input:focus + .slider {
  box-shadow: 0 0 1px #3b82f6;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.custom-multiselect-container,
.custom-select-container {
    position: relative;
}
.pills-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    background-color: #0d1226;
    cursor: text;
}
.pills-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.pills-input-wrapper input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 0.25rem;
    background-color: transparent;
    color: #e2e8f0;
    min-width: 150px;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}
.pill .synergy-icon {
    width: 16px;
    height: 16px;
}
.pill-remove {
    margin-left: 0.5rem;
    width: 1rem;
    height: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
}
.pill-remove:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.custom-select-trigger {
    position: relative;
    width: 100%;
    background-color: #0d1226;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.custom-select-trigger:focus,
.custom-select-container.is-open .custom-select-trigger {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}
.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
    border: solid #94a3b8;
    border-width: 0 2px 2px 0;
    transition: transform 0.2s ease;
}
.custom-select-container.is-open .custom-select-trigger::after {
    transform: translateY(-25%) rotate(225deg);
}

.custom-options-panel,
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 0.25rem;
    width: 100%;
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    max-height: 15rem;
    border-radius: 0.5rem;
    overflow-y: auto;
}
.custom-option,
.custom-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
}
.custom-option:hover,
.custom-select-option:hover {
    background-color: rgba(59, 130, 246, 0.3);
}
.custom-option .synergy-icon {
    width: 20px;
    height: 20px;
}
.custom-select-option.selected {
    font-weight: 700;
    color: #fff;
    background-color: rgba(59, 130, 246, 0.5);
}

.filter-label {
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.8rem;
}
.filter-btn:hover {
    background-color: rgba(51, 65, 85, 1);
    border-color: rgba(59, 130, 246, 0.7);
}
.filter-btn.active {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    border-color: #60a5fa;
}

.filter-input,
.filter-select {
    width: 100%;
    background-color: #0d1226;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Make the image container a positioning parent for the overlay */
.card-image-container {
    position: relative;
}

/* New styles for the overlay image */
.legacy-piece-overlay {
    position: absolute;
    z-index: 2;
    bottom: 8px;
    right: 8px;
    width: 64px;
    height: 64px;
    
    /* Styling to make the icon pop */
    object-fit: contain;
    background-color: rgba(15, 23, 42, 0.8); /* Dark background */
    border-radius: 50%; /* Circular shape */
    padding: 4px; /* Inner spacing */
    
    /* Smooth transition for hover effect */
    transition: all 0.2s ease-in-out;
}