/**
 * AITHYRA Standalone Pages Stylesheet
 *
 * Following AITHYRA Design Guidelines:
 * - Primary colors: Teal (#0a6478), Dark Green (#052323), Grey (#c8c8c8)
 * - Typography: Denim INK (primary), MD Thermochrome 0.3 (secondary), Arial (fallback)
 * - 5% margin on short side
 * - 6-column grid system
 * - Gradients: radial, linear, organic
 */

/* Font Faces - AITHYRA Fonts */
@font-face {
    font-family: 'Denim INK';
    src: url('/wp-content/uploads/fonts/DenimINK-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MD Thermochrome';
    src: url('/wp-content/uploads/fonts/MDThermochrome0.3-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.am365b-standalone {
    font-family: 'Denim INK', 'Arial', sans-serif;
    background: linear-gradient(180deg, #052323 0%, #0a6478 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 5vh 5vw; /* 5% margin */
    overflow-x: hidden;
}

/* Typography Hierarchy (AITHYRA Guidelines) */
.am365b-standalone h1 {
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-weight: 500;
    font-size: clamp(32px, 4vw, 65px); /* Headline: 65pt */
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.am365b-standalone h2 {
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-weight: 400;
    font-size: clamp(24px, 3vw, 40px); /* Sub headline: 40pt */
    line-height: 1.25;
    letter-spacing: 0;
    margin-bottom: 1rem;
    color: #c8c8c8;
}

.am365b-standalone h3 {
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 2vw, 25px); /* Infos: 25pt */
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #f6f6f6;
}

.am365b-standalone p,
.am365b-standalone .body-text {
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 15px); /* Body text: 15pt */
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: #f6f6f6;
}

.am365b-standalone .extra-info {
    font-family: 'MD Thermochrome', 'Courier New', monospace;
    font-weight: 500;
    font-size: clamp(12px, 1vw, 15px); /* Extra infos: 15pt */
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #c8c8c8;
}

/* AITHYRA Logo Area */
.am365b-standalone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(200, 200, 200, 0.2);
}

.am365b-logo {
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-size: clamp(24px, 3vw, 48px);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.am365b-logo .logo-highlight {
    color: #0a6478;
    border-bottom: 3px solid #0a6478;
}

.am365b-current-time {
    font-family: 'MD Thermochrome', 'Courier New', monospace;
    font-size: clamp(18px, 2vw, 32px);
    color: #c8c8c8;
    text-align: right;
    letter-spacing: 0.05em;
}

.am365b-current-date {
    font-size: clamp(12px, 1.2vw, 16px);
    color: #f6f6f6;
    margin-top: 0.25rem;
}

/* Grid Layout (6-column system) */
.am365b-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 1200px) {
    .am365b-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1800px) {
    .am365b-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Resource Display Cards */
.am365b-display-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 5px solid #c8c8c8;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.am365b-display-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(10, 100, 120, 0.4);
}

.am365b-display-card.available {
    border-left-color: #37be55; /* Light green */
}

.am365b-display-card.occupied {
    border-left-color: #ff2300; /* Red */
}

.am365b-resource-name {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 500;
    margin-bottom: 1rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.am365b-status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am365b-status-badge.available {
    background: #37be55;
    color: #052323;
}

.am365b-status-badge.occupied {
    background: #ff2300;
    color: #ffffff;
}

.am365b-resource-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.am365b-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(200, 200, 200, 0.1);
}

.am365b-info-row:last-child {
    border-bottom: none;
}

.am365b-info-label {
    font-size: clamp(12px, 1vw, 14px);
    color: #c8c8c8;
}

.am365b-info-value {
    font-size: clamp(14px, 1.2vw, 16px);
    color: #ffffff;
    font-weight: 500;
}

/* Booking Details */
.am365b-current-booking,
.am365b-next-booking {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(10, 100, 120, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(10, 100, 120, 0.3);
}

.am365b-booking-title {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.am365b-booking-time {
    font-family: 'MD Thermochrome', 'Courier New', monospace;
    font-size: clamp(12px, 1vw, 14px);
    color: #c8c8c8;
}

.am365b-booking-organizer {
    font-size: clamp(11px, 0.9vw, 13px);
    color: #f6f6f6;
    margin-top: 0.25rem;
}

/* Calendar View */
.am365b-calendar-wrapper {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.am365b-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(200, 200, 200, 0.2);
}

.am365b-calendar-title {
    font-size: clamp(24px, 3vw, 40px);
    color: #ffffff;
}

.am365b-calendar-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.am365b-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(10, 100, 120, 0.8);
    color: #ffffff;
    border: 1px solid rgba(10, 100, 120, 1);
    border-radius: 8px;
    font-family: 'Denim INK', 'Arial', sans-serif;
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am365b-btn:hover {
    background: rgba(10, 100, 120, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 100, 120, 0.5);
}

.am365b-btn:active {
    transform: translateY(0);
}

.am365b-btn-secondary {
    background: rgba(200, 200, 200, 0.2);
    border-color: #c8c8c8;
}

.am365b-btn-secondary:hover {
    background: rgba(200, 200, 200, 0.3);
    box-shadow: 0 4px 15px rgba(200, 200, 200, 0.3);
}

/* Calendar Grid */
.am365b-calendar-grid {
    width: 100%;
}

.am365b-calendar-grid table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.am365b-calendar-grid th {
    padding: 1rem;
    background: rgba(10, 100, 120, 0.3);
    color: #ffffff;
    font-weight: 500;
    text-align: center;
    font-size: clamp(12px, 1vw, 14px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.am365b-calendar-grid td {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(200, 200, 200, 0.1);
    vertical-align: top;
    min-height: 80px;
    transition: background 0.2s ease;
}

.am365b-calendar-grid td:hover {
    background: rgba(255, 255, 255, 0.1);
}

.am365b-time-label {
    font-family: 'MD Thermochrome', 'Courier New', monospace;
    color: #c8c8c8;
    font-size: clamp(11px, 0.9vw, 13px);
}

.am365b-calendar-event {
    background: rgba(10, 100, 120, 0.6);
    border-left: 3px solid #0a6478;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: clamp(11px, 0.9vw, 13px);
    color: #ffffff;
    transition: all 0.2s ease;
}

.am365b-calendar-event:hover {
    background: rgba(10, 100, 120, 0.8);
    transform: translateX(3px);
}

.am365b-calendar-event-small {
    padding: 0.35rem;
    font-size: clamp(10px, 0.8vw, 12px);
}

/* Loading State */
.am365b-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    font-size: clamp(18px, 2vw, 24px);
    color: #c8c8c8;
}

.am365b-loading::after {
    content: '...';
    animation: am365b-dots 1.5s infinite;
}

@keyframes am365b-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Footer */
.am365b-standalone-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(200, 200, 200, 0.2);
    text-align: center;
    font-size: clamp(11px, 0.9vw, 13px);
    color: #c8c8c8;
}

.am365b-powered-by {
    opacity: 0.7;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body.am365b-standalone {
        padding: 3vh 3vw;
    }

    .am365b-standalone-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .am365b-current-time {
        text-align: center;
    }

    .am365b-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .am365b-calendar-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    body.am365b-standalone {
        background: white;
        color: #1e1e1e;
    }

    .am365b-display-card {
        break-inside: avoid;
    }

    .am365b-btn {
        display: none;
    }
}
