/**
 * Brand Detail Page Styles
 */

/* Admin View Styles */
.admin-header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal-section-title {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: var(--text-primary);
}

.modal-subsection-title {
    margin: 20px 0 10px 0;
    font-size: 1em;
    color: var(--text-secondary);
}

.form-group-flex {
    flex: 1;
}

.form-group-checkbox {
    display: flex;
    align-items: flex-end;
    padding-bottom: 12px;
}

.form-helper-text {
    color: var(--text-tertiary);
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.form-helper-text-negative-margin {
    color: var(--text-tertiary);
    font-size: 0.85em;
    display: block;
    margin-top: -10px;
}

.relationships-description {
    color: var(--text-tertiary);
    font-size: 0.85em;
    margin-bottom: 15px;
}

.team-season-create-form {
    display: none;
    padding: 15px;
    background: var(--hover-bg);
    border-radius: 8px;
    margin-bottom: 15px;
}

.team-season-create-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.team-season-create-header h4 {
    margin: 0;
    font-size: 1em;
    color: var(--text-primary);
}

.team-season-close-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-tertiary);
}

.form-actions-modal {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Public View Styles */
.brand-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.brand-logo-large {
    margin-bottom: 20px;
}

.brand-logo-large img {
    max-width: 300px;
    max-height: 200px;
    object-fit: contain;
}

.brand-header h1 {
    margin-bottom: 30px;
}

/* 3-Column Layout for Admin View */
.admin-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    gap: 24px;
    margin-bottom: 30px;
}

.admin-three-columns .admin-column {
    min-width: 0;
}

/* Shared Entity Styles (used by brand, team, series) */
.entity-details-wrapper {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.entity-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    gap: 20px;
}

.entity-details-column {
    min-width: 0;
}

.entity-info-card {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: 100%;
}

.entity-info-card h2 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.entity-field-wrapper {
    margin-bottom: 15px;
}

.entity-field-wrapper:last-child {
    margin-bottom: 0;
}

.entity-field-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.entity-field-value {
    padding: 10px;
    background: var(--hover-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.entity-field-link {
    color: var(--accent-primary);
    text-decoration: none;
}

.entity-field-link:hover {
    text-decoration: underline;
}

.entity-field-empty {
    color: var(--text-tertiary);
}

.entity-section-wrapper {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 1024px) {
    .admin-three-columns {
        grid-template-columns: 1fr;
    }

    .entity-three-columns,
    .brand-three-columns {
        grid-template-columns: 1fr;
    }
}

.brand-aliases-card {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.brand-aliases-card h2 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.brand-aliases-scroll {
    max-height: 300px;
    overflow-y: auto;
}

.brand-aliases-table {
    width: 100%;
    border-collapse: collapse;
}

.brand-aliases-table thead tr {
    border-bottom: 2px solid var(--border-color);
}

.brand-aliases-table th {
    text-align: left;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
}

.brand-aliases-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.brand-aliases-table td {
    padding: 10px 8px;
}

.brand-aliases-table .aliases-year-cell {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.brand-logos-section {
    margin-top: 40px;
}

.brand-logos-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.logo-clickable-card {
    cursor: pointer;
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* Brand Colours Component */
.brand-colours-card {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.brand-colours-card h2 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.brand-colours-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* Colour Cards Grid */
.colour-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.colour-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.colour-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.colour-card-preview {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.colour-card-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.colour-card-hex-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.colour-card-hex {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8em;
    color: var(--text-secondary);
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.colour-card-hex-clickable {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.colour-card-hex-clickable:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-copy {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
}

.btn-copy:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.colour-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.btn-icon-sm {
    padding: 4px;
}

.btn-icon-danger:hover {
    color: var(--error-red);
    background: rgba(var(--error-red-rgb), 0.1);
}

/* Colour Modal Styles */
.colour-input-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.colour-input-tab {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.colour-input-tab:hover {
    background: var(--hover-bg);
}

.colour-input-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.colour-input-container {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.colour-input-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.colour-input-fields {
    flex: 1;
    min-width: 0;
}

.colour-input-mode {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.colour-picker-native {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

.colour-picker-native::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.colour-picker-native::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

.colour-hex-input {
    flex: 1;
    min-width: 100px;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
}

.rgb-inputs,
.hsv-inputs {
    display: flex;
    gap: 8px;
}

.rgb-input-group,
.hsv-input-group {
    flex: 1;
}

.rgb-input-group label,
.hsv-input-group label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.rgb-input-group input,
.hsv-input-group input {
    width: 100%;
}
