/* ???????????????????????????????????????????????
   GLOBAL STYLES - LUXURY GALA THEME
   ??????????????????????????????????????????????? */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1A1A1A; }
::-webkit-scrollbar-thumb { background: #C9A84C; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #D4AF37; }
* { scrollbar-width: thin; scrollbar-color: #C9A84C #1A1A1A; }

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: #1A1A1A;
    color: #F0EDE6;
    -webkit-font-smoothing: antialiased;
}

/* Prevent focus outline on non-interactive elements */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
p:focus, div:focus, section:focus, main:focus, header:focus, footer:focus {
    outline: none;
}

/* Material Symbols utility */
.ms {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

.ms-fill {
    font-variation-settings: 'FILL';
}

a {
    color: #D4AF37;
}

a:hover {
    color: #E8C84A;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #F0EDE6;
}

/* ?? Form Controls ?? */
input, textarea, select {
    background: #2A2A2A;
    border: 1px solid #444;
    color: #ffffff !important;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    transition: border-color 0.3s;
    color-scheme: dark;
}

/* Override browser autofill dark text */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #2A2A2A inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

input::placeholder, textarea::placeholder {
    color: #999;
}

/* ?? Buttons ?? */
.btn-gold {
    background: linear-gradient(135deg, #D4AF37, #B8941F);
    color: #1A1A1A;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    text-decoration: none;
}

    .btn-gold:hover {
        color: #1A1A1A;
        background: linear-gradient(135deg, #E8C84A, #D4AF37);
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
        transform: translateY(-2px);
    }

.btn-outline-gold {
    background: transparent;
    color: #D4AF37;
    padding: 0.65rem 1.5rem;
    border: 1px solid #D4AF37;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-gold:hover {
    background: #D4AF37;
    color: #1A1A1A;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.btn-danger {
    background: #8B2020;
    color: #fff;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #A52A2A;
}

/* ?? Card System ?? */
.gala-card {
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.gala-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.1);
    transform: translateY(-4px);
}

.gala-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #2A2A2A;
    animation: imgFadeIn 0.35s ease-in;
}

@keyframes imgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gala-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.25rem;
}

.gala-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin: 0;
    color: #F0EDE6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.gala-card-text {
    color: #A0998C;
    font-size: 0.85rem;
    line-height: 1.5;
}

.gala-card-price {
    color: #D4AF37;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* ?? Grid Layouts ?? */
.gala-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gala-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ?? Section Headings ?? */
.gala-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    color: #F0EDE6;
    margin-bottom: 0.5rem;
}

.gala-section-subtitle {
    text-align: center;
    color: #A0998C;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.gala-gold-divider {
    width: 60px;
    height: 2px;
    background: #D4AF37;
    margin: 0.75rem auto 2rem;
}

/* ?? Page Header ?? */
.gala-page-header {
    text-align: center;
    padding: 2rem 0 1rem;
}

.gala-page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #D4AF37;
    margin-bottom: 0.25rem;
}

/* ?? Status Badges ?? */
.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: #D4AF37;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-green {
    background: rgba(38, 176, 80, 0.15);
    color: #26b050;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-red {
    background: rgba(229, 0, 0, 0.15);
    color: #e55050;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-purple {
    background: rgba(155, 89, 220, 0.15);
    color: #9b59dc;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ?? Tables ?? */
.gala-table {
    width: 100%;
    border-collapse: collapse;
}

.gala-table th {
    background: #2A2A2A;
    color: #D4AF37;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
}

.gala-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
    color: #F0EDE6;
}

.gala-table tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

/* Enquiry status select */
.gala-status-select {
    background: #1E1E1E;
    color: #F0EDE6;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    outline: none;
    color-scheme: dark;
}

.gala-status-select option {
    background: #1E1E1E;
    color: #F0EDE6;
    border-radius: 0;
}

.gala-status-select.status-pending {
    border-color: #D4AF37;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
}

.gala-status-select.status-completed {
    border-color: #26b050;
    color: #26b050;
    background: rgba(38, 176, 80, 0.1);
}

.gala-status-select.status-rejected {
    border-color: #e55050;
    color: #e55050;
    background: rgba(229, 0, 0, 0.1);
}

/* ?? Form Layout ?? */
.gala-form-group {
    margin-bottom: 1.25rem;
}

.gala-form-group label {
    display: block;
    color: #D4AF37;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ?? Alerts ?? */
.gala-alert {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.gala-alert-error {
    background: rgba(229, 0, 0, 0.1);
    border: 1px solid rgba(229, 0, 0, 0.3);
    color: #e55050;
}

.gala-alert-success {
    background: rgba(38, 176, 80, 0.1);
    border: 1px solid rgba(38, 176, 80, 0.3);
    color: #26b050;
}

.gala-alert-warning {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #D4AF37;
}

/* ?? Validation ?? */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e55050;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ?? Blazor Error UI ?? */
#blazor-error-ui {
    background: #8B2020;
    color: white;
    padding: 0.75rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    display: none;
}

.blazor-error-boundary {
    background: #8B2020;
    padding: 1rem;
    color: white;
    border-radius: 4px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ?? Responsive ?? */
@media (max-width: 768px) {
    .gala-grid-3 {
        grid-template-columns: 1fr;
    }

    .gala-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .gala-grid {
        grid-template-columns: 1fr;
    }
}

a.gala-card {
    cursor: pointer;
    color: inherit;
}

a.gala-card:hover {
    color: inherit;
}

.favorite-icon {
    color: #D4AF37; /* default gold */
    transition: color 0.3s ease;
}

    .favorite-icon:hover {
        color: #2A2A2A;
    }
