/* Custom styles for DjangoTranet */

/* Local Manrope font (no external CDN dependency). */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/static/vendors/fonts/manrope/Manrope-400.ttf") format("truetype");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/static/vendors/fonts/manrope/Manrope-500.ttf") format("truetype");
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/static/vendors/fonts/manrope/Manrope-700.ttf") format("truetype");
}

:root {
    --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Custom CSS for standardizing layouts across all non-admin pages */

/* Standardized container - optimized for larger screens */
.kt-container {
    max-width: 80rem; /* 1280px - standard size for smaller screens */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem; /* 16px - equivalent to px-4 */
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .kt-container {
        padding-left: 1.5rem; /* 24px - equivalent to sm:px-6 */
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .kt-container {
        padding-left: 2rem; /* 32px - equivalent to lg:px-8 */
        padding-right: 2rem;
    }
}

@media (min-width: 1440px) {
    .kt-container {
        max-width: 120rem; /* 1920px - wider for 1440p screens */
        padding-left: 2.5rem; /* 40px - more padding for very wide screens */
        padding-right: 2.5rem;
    }
}

@media (min-width: 1920px) {
    .kt-container {
        max-width: 120rem; /* 1920px - maintain same width for 4K screens */
        padding-left: 3rem; /* 48px - proportional padding */
        padding-right: 3rem;
    }
}


/* Standardized card body padding */
.kt-card-content-default {
    padding: 1.25rem; /* 20px - equivalent to p-5 */
}

@media (min-width: 1024px) {
    .kt-card-content-default {
        padding: 1.875rem; /* 30px - equivalent to lg:p-7.5 */
    }
}

/* Page header standardization */
.kt-page-header {
    margin-bottom: 1.25rem; /* 20px - equivalent to mb-5 */
}

@media (min-width: 1024px) {
    .kt-page-header {
        margin-bottom: 1.875rem; /* 30px - equivalent to lg:mb-7.5 */
        padding-bottom: 1.875rem; /* 30px - equivalent to lg:pb-7.5 */
    }
}

/* Breadcrumb standardization */
.kt-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: rgb(75 85 99); /* text-gray-600 */
}

.kt-breadcrumb a {
    color: rgb(75 85 99); /* text-gray-600 */
    transition: color 150ms ease-in-out;
}

.kt-breadcrumb a:hover {
    color: var(--tw-color-primary); /* hover:text-primary */
}

.kt-breadcrumb .active {
    color: rgb(55 65 81); /* text-gray-700 */
}

/* Page title standardization */
.kt-page-title {
    font-size: 1.25rem; /* 20px - equivalent to text-xl */
    font-weight: 600; /* equivalent to font-semibold */
    line-height: 1; /* equivalent to leading-none */
    color: rgb(17 24 39); /* text-gray-900 */
    margin-bottom: 0.5rem; /* 8px */
}

/* Dark mode support - using data attributes instead of prefers-color-scheme */
[data-kt-theme="dark"] .kt-page-title {
    color: rgb(243 244 246); /* text-gray-100 */
}

[data-kt-theme="dark"] .kt-breadcrumb {
    color: rgb(156 163 175); /* text-gray-400 */
}

[data-kt-theme="dark"] .kt-breadcrumb a {
    color: rgb(156 163 175); /* text-gray-400 */
}

[data-kt-theme="dark"] .kt-breadcrumb .active {
    color: rgb(229 231 235); /* text-gray-200 */
}

/* Content spacing standardization */
.kt-content-section {
    margin-bottom: 1.25rem; /* 20px - equivalent to mb-5 */
}

@media (min-width: 1024px) {
    .kt-content-section {
        margin-bottom: 1.875rem; /* 30px - equivalent to lg:mb-7.5 */
    }
}

/* Grid gap standardization */
.kt-grid-gap {
    gap: 1.25rem; /* 20px - equivalent to gap-5 */
}

@media (min-width: 1024px) {
    .kt-grid-gap {
        gap: 1.875rem; /* 30px - equivalent to lg:gap-7.5 */
    }
}

/* Card header standardization */
.kt-card-header {
    padding: 1.25rem; /* 20px - equivalent to p-5 */
}

@media (min-width: 1024px) {
    .kt-card-header {
        padding: 1.5rem; /* 24px - equivalent to lg:p-6 */
    }
}

/* Card title standardization */
.kt-card-title {
    font-size: 1.125rem; /* 18px - equivalent to text-lg */
    font-weight: 600; /* equivalent to font-semibold */
    margin: 0;
}

/* Card footer standardization */
.kt-card-footer {
    padding: 1.25rem; /* 20px - equivalent to p-5 */
}

@media (min-width: 1024px) {
    .kt-card-footer {
        padding: 1.5rem; /* 24px - equivalent to lg:p-6 */
    }
}

/* Sidebar logo: use white in dark sidebar */
.kt-sidebar.dark .default-logo,
.kt-sidebar.dark .small-logo {
    filter: invert(1) brightness(1.2);
}

/* Toast translucency */
.kt-toast {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.kt-toast.kt-alert-solid.kt-alert-success {
    background-color: rgba(34, 197, 94, 0.72) !important;
}

.kt-toast.kt-alert-solid.kt-alert-destructive {
    background-color: rgba(220, 38, 38, 0.72) !important;
}

.kt-toast.kt-alert-solid.kt-alert-warning {
    background-color: rgba(234, 179, 8, 0.75) !important;
}

.kt-toast.kt-alert-solid.kt-alert-info {
    background-color: rgba(124, 58, 237, 0.72) !important;
}

.kt-toast.kt-alert-solid.kt-alert-error,
.kt-toast.kt-alert-solid.kt-alert-danger {
    background-color: rgba(220, 38, 38, 0.72) !important;
}

/* World clocks: compact (half-width widget) layout tuning */
.world-clocks-widget--compact .world-clocks-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1280px) {
    .world-clocks-widget--compact .world-clocks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.world-clocks-widget--compact [data-clock] {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.world-clocks-widget--compact [data-clock] > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.world-clocks-widget--compact [data-clock-time] {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.25rem;
}

.world-clocks-widget--compact [data-clock-label] {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.world-clocks-widget--compact [data-clock-label-text] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
