/* ==========================================================================
   ZenithXI Site Styles - Consolidated CSS
   ========================================================================== */

/* Font Face Declarations */
@font-face {
    font-family: 'Ferrum';
    src: url('/fonts/Ferrum-wy99.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'OPTIEngeEtienne';
    src: url('/fonts/OPTIEngeEtienne.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Final Fantasy';
    src: url('/fonts/finalf.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* External Imports */
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* CSS Variables / Custom Properties */
:root {
    /* Light theme variables */
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --card-bg: #ffffff;
    --primary-text: #333333;
    --secondary-text: #6c757d;
    --border-color: #dee2e6;
    --link-color: #2E86AB;
    --link-hover-color: #0056b3;
    --header-bg: #ffffff;
    --footer-bg: #f8f9fa;
    --btn-bg: #17C3B2;
    --btn-text: #ffffff;
    --input-bg: #ffffff;
    --input-text: #333333;
    --table-header-bg: #f8f9fa;
    --table-border: #dee2e6;
    --navbar-link: #333333;
    --navbar-link-hover: #17C3B2;
    --box-shadow: rgba(0, 0, 0, 0.1);
    --accent-color: #F4A261;
    --zenith-color: #17C3B2;

    /* Toast notification variables */
    --rz-notification-border-radius: 50px;
    --rz-notification-padding: 16px 20px 16px 16px;
    --rz-notification-gap: 16px;
    --rz-notification-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Radzen Dialog Overlay - Semi-transparent black background */
.rz-dialog-mask {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.rz-dialog-wrapper {
    background-color: transparent !important;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html, body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: #F9FAFC;
    color: #000000A6;
    position: relative;
}

/* Background image for light mode */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("/Images/light-bg2.jpg") no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

main {
    flex: 1;
}

.content {
    padding-top: 1.1rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    font-weight: 500 !important;
    margin-bottom: 0em;
    margin-top: .25em;
}

h1 {
    font-size: 40px;
    font-weight: 500;
    margin-top: 40px;
    padding-left: 20px;
}

h1:focus {
    outline: none;
}

h2 {
    font-size: 25px;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 20px;
}

h5 {
    font-size: 18px;
}

h6 {
    font-size: 15px;
}

header {
    margin-bottom: 20px;
    font-size: 40px;
    font-weight: 500;
}

.ahitem {
    font-size: 40px;
    font-weight: 500;
    margin-left: 15px;
    text-transform: uppercase;
    color: var(--zenith-color);
}

p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
    font-size: medium;
}

/* ==========================================================================
   Links and Buttons
   ========================================================================== */

a, .btn-link {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover-color);
}

.custom-link {
    font-weight: 600 !important;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.custom-link:hover {
    text-decoration: underline !important;
    color: #8338EC !important;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn-play {
    background-color: #00A6FB;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 500;
}

.btn-play:hover {
    background-color: #7ec0e8;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ==========================================================================
   Navigation & Header
   ========================================================================== */

.navbar {
    background-color: #f9fafc;
}

.navbar-toggler {
    color: #0077B6;
    border-color: #0077B6;
    border-width: 1px;
    transition: border-width 0.15s ease-in-out;
}

.navbar-toggler:hover {
    border-width: 2px;
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 119, 182, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Branding */
.branding {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.branding img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
}

.brand-zenith {
    color: #0077B6;
    font-size: xx-large;
    font-weight: 400;
}

.brand-xi {
    color: #F4A261;
    font-size: xx-large;
    font-weight: 400;
}

/* Enhanced dropdown styling */
.navbar .dropdown-menu {
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 5px rgba(91, 188, 221, 0.2), 0 0 15px rgba(23, 195, 178, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 5px;
    background-color: var(--primary-bg, #ffffff);
    animation: dropdownFade 0.2s ease-in-out;
    overflow: hidden;
    text-align: center;
}

.navbar .dropdown-menu:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary-bg, #ffffff);
    z-index: 2;
}

.navbar .dropdown-menu:after {
    content: '';
    position: absolute;
    top: -10px;
    left: 18px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(0, 0, 0, 0.05);
    z-index: 1;
    filter: blur(1px);
}

.navbar .dropdown-item {
    padding: 8px 15px;
    transition: all 0.2s ease;
    margin: 2px auto;
    width: calc(100% - 16px);
    box-sizing: border-box;
    display: block;
    text-align: left;
}

.navbar .dropdown-item:hover {
    background-color: rgba(91, 188, 221, 0.1);
    color: var(--navbar-link-hover, #17C3B2);
    border-radius: 6px;
}

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

/* ==========================================================================
   Cards & Content Containers
   ========================================================================== */

.card {
    position: relative;
    box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-top: 20px;
    padding: 40px;
    color: #000000A6;
    --bs-card-spacer-y: 0rem;
    --bs-card-spacer-x: 0rem;
}

/* Compact card body class for pages requiring reduced padding */
.card-body-compact {
    padding: 20px !important;
}

/* MacroEditor page specific card class with reduced padding */
.card-compact {
    position: relative;
    box-shadow: 0px 0px 20px 5px var(--box-shadow);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-top: 20px;
    padding: 20px !important;
    color: var(--primary-text);
    --bs-card-spacer-y: 0rem;
    --bs-card-spacer-x: 0rem;
}

/* Rounded corners for colored card headers */
.card-header {
    border-radius: 10px 10px 0 0 !important;
}

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-info,
.card-header.bg-warning,
.card-header.bg-secondary {
    border-radius: 10px !important;
    padding: 10px !important;
}

.inner-card {
    position: relative;
    box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    padding: 30px;
    width: 95%;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-top: 20px;
}

.content-container {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-top: 20px;
}

/* Overlay image responsive design */
.overlay-image {
    position: absolute;
    top: -120px;
    right: 0;
    width: 250px;
    height: auto;
    z-index: 1;
}

@media (max-width: 992px) {
    .overlay-image {
        width: 200px;
        top: -80px;
    }
}

@media (max-width: 768px) {
    .overlay-image {
        width: 150px;
        top: -60px;
        right: 0;
    }

    .card-body {
        flex-direction: column;
        align-items: stretch;
    }

    .text-content, .image-container {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .image-container {
        margin-top: 25px;
    }

    .btn-primary:hover {
        background-color: #00A6FB;
        border-color: #004085;
    }

    .btn-secondary:hover {
        background-color: #545b62;
        border-color: #4e555b;
    }
}

@media (max-width: 576px) {
    .overlay-image {
        width: 120px;
        top: -50px;
    }
}

@media (max-width: 400px) {
    .overlay-image {
        width: 100px;
        top: -40px;
    }
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table {
    border-radius: 10px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.table.table-sm.table-hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #dee2e6;
}

.table.table-sm.table-hover thead tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

.table.table-sm.table-hover thead tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

.table.table-sm.table-hover tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.table.table-sm.table-hover tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.table th,
.table td {
    padding-left: 10px !important;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert-success {
    border: 1px solid #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--primary-text);
}

.alert-danger {
    border: 1px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--primary-text);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.footer {
    background-color: #374450;
    color: #fff;
    padding: 20px 0;
    margin-top: auto;
}

footer.footer .social-icons a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: color 0.3s;
}

footer.footer .social-icons a:hover {
    color: #7ec0e8;
}

footer.footer .footer-text p {
    margin: 0;
}

.btn-close.text-reset {
    color: #0077B6;
    border-color: #0077B6;
}

/* ==========================================================================
   Error Handling
   ========================================================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4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or-error-boundary::after {
    content: "An error has occurred."
}

/* ==========================================================================
   Toast Notifications (Radzen)
   ========================================================================== */

/* Ensure RadzenNotification component doesn't affect page layout */
radzen-notification {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 9999;
}

/* Base notification styling */
.rz-notification-item-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    pointer-events: auto;
}

/* Remove default background from inner elements to prevent double styling */
.rz-notification-item-wrapper .rz-notification-item,
.rz-notification-item-wrapper .rz-notification-message-wrapper,
.rz-notification-item-wrapper .rz-notification-message {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Success - Green background, white text */
.rz-notification-item-wrapper.rz-notification-success {
    background-color: #10b981 !important;
}

.rz-notification-item-wrapper.rz-notification-success .rz-notification-title,
.rz-notification-item-wrapper.rz-notification-success .rz-notification-content,
.rz-notification-item-wrapper.rz-notification-success .rz-notification-close,
.rz-notification-item-wrapper.rz-notification-success .rzi {
    color: #fff !important;
}

/* Error - Red background, white text */
.rz-notification-item-wrapper.rz-notification-error {
    background-color: #ef4444 !important;
}

.rz-notification-item-wrapper.rz-notification-error .rz-notification-title,
.rz-notification-item-wrapper.rz-notification-error .rz-notification-content,
.rz-notification-item-wrapper.rz-notification-error .rz-notification-close,
.rz-notification-item-wrapper.rz-notification-error .rzi {
    color: #fff !important;
}

/* Warning - Orange background, white text */
.rz-notification-item-wrapper.rz-notification-warn {
    background-color: #f59e0b !important;
}

.rz-notification-item-wrapper.rz-notification-warn .rz-notification-title,
.rz-notification-item-wrapper.rz-notification-warn .rz-notification-content,
.rz-notification-item-wrapper.rz-notification-warn .rz-notification-close,
.rz-notification-item-wrapper.rz-notification-warn .rzi {
    color: #fff !important;
}

/* Info - Blue background, white text */
.rz-notification-item-wrapper.rz-notification-info {
    background-color: #3b82f6 !important;
}

.rz-notification-item-wrapper.rz-notification-info .rz-notification-title,
.rz-notification-item-wrapper.rz-notification-info .rz-notification-content,
.rz-notification-item-wrapper.rz-notification-info .rz-notification-close,
.rz-notification-item-wrapper.rz-notification-info .rzi {
    color: #fff !important;
}

/* ==========================================================================
   Radzen DataGrid Light Mode - Rounded Corners & Styling
   ========================================================================== */

/* DataGrid wrapper for rounded corners */
.datagrid-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background-color: var(--rz-base-background-color, #ffffff);
    padding: 1rem;
}

.datagrid-wrapper .rz-data-grid,
.datagrid-wrapper .rz-datatable,
.datagrid-wrapper .rz-grid-table {
    border: none !important;
    border-radius: 0 !important;
}

/* Header styling with teal accent */
.datagrid-wrapper .rz-datatable-thead > tr > th {
    background: #e6f7f5 !important;
    border-bottom: 2px solid #17C3B2 !important;
    font-weight: 600;
    color: #1a1a1a;
}

/* First header cell - rounded corner */
.datagrid-wrapper .rz-datatable-thead > tr > th:first-child {
    border-top-left-radius: 12px;
}

/* Last header cell - rounded corner */
.datagrid-wrapper .rz-datatable-thead > tr > th:last-child {
    border-top-right-radius: 12px;
}

/* Alternating row colors - light mode */
.datagrid-wrapper .rz-datatable-data > tr:nth-child(odd) {
    background-color: #ffffff !important;
}

.datagrid-wrapper .rz-datatable-data > tr:nth-child(even) {
    background-color: #f3f4f6 !important;
}

/* Row hover effect */
.datagrid-wrapper .rz-datatable-data > tr:hover {
    background-color: rgba(23, 195, 178, 0.08) !important;
}

/* Pager rounded bottom corners */
.datagrid-wrapper .rz-pager {
    border-radius: 0 0 12px 12px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* ==========================================================================
   DataGrid Header Styling via HeaderCssClass
   Applied directly to header cells via RadzenDataGridColumn HeaderCssClass
   ========================================================================== */

.styled-header {
    background: linear-gradient(180deg, #e6f7f5 0%, #d4f1ee 100%) !important;
    background-color: #e6f7f5 !important;
/*    border-bottom: 2px solid #17C3B2 !important;*/
    font-weight: 600 !important;
    color: #1a1a1a !important;
   /* padding: 0.875rem 1rem !important;*/
   margin: 0.875rem 1rem !important;
}

/* First header cell gets left rounded corner */
.styled-header:first-child {
    border-top-left-radius: 12px !important;
}

/* Last header cell gets right rounded corner */
.styled-header:last-child {
    border-top-right-radius: 12px !important;
}

/* ==========================================================================
   News Editor Dialog - Styling
   ========================================================================== */

/* Style the title bar but keep it visible for dragging */
.news-editor-dialog .rz-dialog-titlebar {
    background: var(--rz-base-background);
    border-bottom: 1px solid var(--rz-base-300);
    padding: 0.75rem 1rem;
}

.news-editor-dialog .rz-dialog-content {
    padding: 1rem !important;
    overflow: hidden;
}

/* Maximize button injected into title bar */
.news-editor-dialog .dialog-maximize-btn {
    background: transparent;
    border: none;
    color: var(--rz-text-color);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-right: 0.25rem;
}

.news-editor-dialog .dialog-maximize-btn:hover {
    background: var(--rz-base-200);
}

/* Modern Scrollbar Styling */
.news-editor-dialog ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.news-editor-dialog ::-webkit-scrollbar-track {
    background: var(--rz-base-200);
    border-radius: 4px;
}

.news-editor-dialog ::-webkit-scrollbar-thumb {
    background: var(--rz-base-400);
    border-radius: 4px;
}

.news-editor-dialog ::-webkit-scrollbar-thumb:hover {
    background: var(--rz-base-500);
}

/* Firefox scrollbar */
.news-editor-dialog * {
    scrollbar-width: thin;
    scrollbar-color: var(--rz-base-400) var(--rz-base-200);
}