/* Brand Selection Modal Styles */
/* Matches existing ticket management system theme:
   - Inter font family
   - Blue (#3b82f6) primary color
   - White cards with shadow depth
   - 8-20px border radius
   - Smooth transitions and hover effects
*/

:root {
    --jno-blue: #3b82f6;
    --jno-blue-dark: #2563eb;
    --jno-gray: #64748b;
    --jno-bg: #f8fafc;
    --jno-card: #fff;
}

/* Brand Modal Backdrop */
.brand-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.brand-modal-backdrop.hidden {
    display: none;
}

/* Brand Modal Container */
.brand-modal-container {
    background: var(--jno-card);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    max-width: 700px;
    width: 100%;
    padding: 28px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.brand-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--jno-blue), var(--jno-blue-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.brand-modal-icon i {
    color: white;
    font-size: 28px;
}

.brand-modal-title {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.brand-modal-subtitle {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 16px;
    color: var(--jno-gray);
    margin: 0;
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Brand Tile */
.brand-tile {
    background: var(--jno-card);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
    border-color: var(--jno-blue);
}

.brand-tile:active {
    transform: translateY(-2px) scale(1.01);
}

.brand-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--jno-blue), var(--jno-blue-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.brand-tile:hover::before {
    transform: scaleX(1);
}

/* Brand Icon */
.brand-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    transition: all 0.3s ease;
}

.brand-tile:hover .brand-icon {
    background: linear-gradient(135deg, var(--jno-blue), var(--jno-blue-dark));
    transform: scale(1.1);
}

.brand-icon i {
    font-size: 28px;
    color: var(--jno-gray);
    transition: color 0.3s ease;
}

.brand-tile:hover .brand-icon i {
    color: white;
}

/* Brand Logo (if image is provided) */
.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 14px;
    display: block;
}

/* Brand Name */
.brand-name {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    transition: color 0.3s ease;
}

.brand-tile:hover .brand-name {
    color: var(--jno-blue);
}

/* Brand Description */
.brand-description {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 13px;
    color: var(--jno-gray);
    margin: 0;
    line-height: 1.3;
}

/* Loading State */
.brand-tile.loading {
    pointer-events: none;
    opacity: 0.6;
}

.brand-tile.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--jno-blue);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .brand-modal-container {
        padding: 24px;
    }

    .brand-modal-title {
        font-size: 24px;
    }

    .brand-tile {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .brand-modal-container {
        padding: 20px;
    }

    .brand-modal-title {
        font-size: 22px;
    }

    .brand-modal-subtitle {
        font-size: 14px;
    }

    .brand-tile {
        padding: 16px;
    }

    .brand-icon,
    .brand-logo {
        width: 56px;
        height: 56px;
    }

    .brand-icon i {
        font-size: 20px;
    }
}

/* Accessibility */
.brand-tile:focus {
    outline: 2px solid var(--jno-blue);
    outline-offset: 2px;
}

.brand-tile:focus:not(:focus-visible) {
    outline: none;
}

/* Skip Link for Keyboard Users */
.skip-brand-selection {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--jno-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
}

.skip-brand-selection:focus {
    top: 10px;
    left: 10px;
}
