/* Professional Theme Styles */

:root {
    /* Theme colors - can be overridden by inline styles from GlobalControllerAdvice */
    --primary-color: #74c0fc;
    --primary-dark: #5fc3fc;
    --primary-light: #8dd0ff;
    --panels-buttons-color: #74c0fc;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: #334155;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--card-shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tables */
.table {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f1f5f9;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #f8fafc;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(116, 192, 252, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Modals */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

.modal-body {
    padding: 1.5rem;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: var(--card-shadow);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    margin-top: 4rem;
}

/* Override bg-dark class for footer */
footer.bg-dark {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    background-color: var(--primary-color) !important;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-light) !important;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--dark-color) 0%, #0f172a 100%) !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    border-left-color: var(--primary-color);
    background-color: rgba(116, 192, 252, 0.1);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(116, 192, 252, 0.2) 0%, transparent 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-light) !important;
}

/* Search */
.form-control-lg {
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
}

/* Badges */
.badge {
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    cursor: pointer;
}

/* Add to Cart Button - uses configurable panels/buttons color from theme (override .btn-primary) */
.btn-primary.add-to-cart-btn,
.btn-primary.add-to-cart-btn-modal,
.add-to-cart-btn.btn-primary,
.add-to-cart-btn-modal.btn-primary {
    font-weight: 600;
    text-transform: none !important;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    background: var(--panels-buttons-color, #74c0fc) !important;
    background-color: var(--panels-buttons-color, #74c0fc) !important;
    border-color: var(--panels-buttons-color, #74c0fc) !important;
}
.btn-primary.add-to-cart-btn:hover,
.btn-primary.add-to-cart-btn-modal:hover,
.add-to-cart-btn.btn-primary:hover,
.add-to-cart-btn-modal.btn-primary:hover {
    background: var(--panels-buttons-color, #74c0fc) !important;
    background-color: var(--panels-buttons-color, #74c0fc) !important;
    border-color: var(--panels-buttons-color, #74c0fc) !important;
    filter: brightness(1.05);
}

.add-to-cart-btn span, .add-to-cart-btn-modal span {
    text-transform: none !important;
}

/* Responsive */
@media (max-width: 576px) {
    .card-img-top {
        height: 180px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Override Bootstrap bg-primary with theme color */
.bg-primary {
    background-color: var(--primary-color) !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

/* ========== Cookie consent ========== */
.cookie-consent-modal-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1300;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.cookie-consent-modal-overlay.is-open {
    display: flex !important;
}

.cookie-consent-modal-box {
    background: #ffffff !important;
    color: #111827 !important;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 20px 22px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left !important;
}

.cookie-consent-modal-box h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111827 !important;
}

.cookie-consent-modal-text {
    margin: 0 0 14px;
    color: #6b7280 !important;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.cookie-consent-policy {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827 !important;
    text-align: left !important;
}

.cookie-consent-policy h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827 !important;
}

.cookie-consent-policy__body {
    max-height: 160px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #374151 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.cookie-consent-policy__body p,
.cookie-consent-policy__body ul,
.cookie-consent-policy__body li,
.cookie-consent-policy__body h5 {
    margin: 0 0 8px;
    color: inherit !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.cookie-consent-policy__body ul {
    padding-left: 1.2rem;
    margin-bottom: 8px;
}

.cookie-consent-policy__body li {
    margin-bottom: 4px;
}

.cookie-consent-policy__body h5 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
}

.cookie-consent-policy__link {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary-color, #74c0fc) !important;
    text-decoration: underline;
}

.cookie-consent-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
}

.cookie-consent-option {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 !important;
    cursor: pointer;
    background: #fff;
    color: #111827 !important;
    text-align: left !important;
}

.cookie-consent-option input[type="checkbox"] {
    margin: 3px 0 0 0 !important;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem;
    flex: 0 0 auto;
    float: none !important;
}

.cookie-consent-option__text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    color: #111827 !important;
    text-align: left !important;
}

.cookie-consent-option__text strong {
    display: block;
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: #111827 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.cookie-consent-option__text p {
    display: block;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6b7280 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.cookie-consent-modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

/* ========== Contact help modal ========== */
body.contact-help-modal-open {
    overflow: hidden !important;
}

.contact-help-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    z-index: 20000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.contact-help-modal-overlay.is-open,
.contact-help-modal-overlay.is-open[style] {
    display: flex !important;
}

.contact-help-modal-box {
    position: relative !important;
    background: #ffffff !important;
    color: #111827 !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #e5e7eb !important;
    padding: 20px 22px !important;
    width: 100% !important;
    max-width: 560px !important;
    max-height: calc(100vh - 32px) !important;
    overflow: auto !important;
    box-sizing: border-box !important;
    text-align: left !important;
    flex: 0 1 auto !important;
    margin: 0 auto !important;
}

.contact-help-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

.contact-help-modal-box h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.contact-help-modal-close {
    border: 0 !important;
    background: transparent !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    padding: 0 4px !important;
}

.contact-help-modal-close:hover {
    color: #111827 !important;
}

.contact-help-modal-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.contact-help-panel {
    margin-top: 1rem;
}

