/* ═══════════════════════════════════════════════════════════
   Wilson Mediation Calendar — Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* Pre-rendered Forminator form – visually hidden but accessible to JS */
#wmc-form-prerender {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

/* When moved inside the modal it becomes a normal block */
#wmc-modal-content #wmc-form-prerender {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

/* Wrapper */
#wmc-wrapper {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Titles */
.wmc-title {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 8px;
    color: #1a1a2e;
    letter-spacing: 0.5px;
}

.wmc-subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Navigation */
.wmc-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
}

.wmc-nav button {
    background: none;
    border: 2px solid #3a6ea5;
    color: #3a6ea5;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wmc-nav button:hover {
    background: #3a6ea5;
    color: #fff;
}

#wmc-month-label {
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1a1a2e;
    min-width: 220px;
    text-align: center;
}

/* Grid */
#wmc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.wmc-day-header {
    text-align: center;
    font-weight: 700;
    padding: 8px 0;
    color: #444;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Day cells */
.wmc-day {
    border-radius: 6px;
    min-height: 90px;
    padding: 8px;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s, box-shadow 0.1s;
    box-sizing: border-box;
}

.wmc-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1;
}

.wmc-day.wmc-past {
    cursor: default;
    opacity: 0.5;
}

.wmc-day.wmc-past:hover {
    transform: none;
    box-shadow: none;
}

/* Available */
.wmc-day.wmc-available {
    background: #b8cfe8;
    border: 1px solid #8aaece;
}

/* Booked */
.wmc-day.wmc-booked {
    background: #888;
    border: 1px solid #666;
    cursor: default;
}

.wmc-day.wmc-booked:hover {
    transform: none;
    box-shadow: none;
}

/* Admin-only booked (can click to remove) */
.wmc-day.wmc-booked.wmc-admin-remove {
    cursor: pointer;
}

.wmc-day.wmc-booked.wmc-admin-remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Day number */
.wmc-day-num {
    font-size: 0.9em;
    font-weight: 700;
    color: #222;
}

.wmc-day.wmc-booked .wmc-day-num {
    color: #ccc;
}

/* Status label */
.wmc-status-label {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #1a3a5c;
}

.wmc-day.wmc-booked .wmc-status-label {
    color: #ccc;
}

/* Admin badge */
.wmc-admin-badge {
    display: block;
    margin-top: 4px;
    font-size: 0.62em;
    color: #f8d7da;
    letter-spacing: 0.5px;
}



/* Pending state appearance */

/* Empty cell (padding for grid alignment) */
.wmc-empty {
    background: transparent;
    border: none;
    pointer-events: none;
}

/* Updated label */
.wmc-updated {
    text-align: center;
    font-size: 0.85em;
    color: #777;
    margin-top: 14px;
}

/* ── Modal ─────────────────────────────────────────────── */
#wmc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* form wrapper inside modal */
.wmc-form-container {
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0 10px 0;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.wmc-form-container form {
    margin: 0;
    padding: 0;
}

.wmc-form-container input[type="text"],
.wmc-form-container input[type="email"],
.wmc-form-container input[type="tel"],
.wmc-form-container input[type="number"],
.wmc-form-container textarea,
.wmc-form-container select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.wmc-form-container textarea {
    resize: vertical;
    min-height: 100px;
}

#wmc-overlay.wmc-hidden {
    display: none;
}

#wmc-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    box-sizing: border-box;
    animation: wmc-pop 0.2s ease;
    overflow: hidden;
}

#wmc-modal-content {
    overflow-y: auto;
    padding: 36px 40px;
    flex: 1;
    box-sizing: border-box;
}

#wmc-modal-content::-webkit-scrollbar {
    width: 8px;
}

#wmc-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#wmc-modal-content::-webkit-scrollbar-thumb {
    background: #b8cfe8;
    border-radius: 10px;
}

#wmc-modal-content::-webkit-scrollbar-thumb:hover {
    background: #8aaece;
}

@keyframes wmc-pop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

#wmc-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6em;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

#wmc-modal-close:hover {
    color: #333;
}

/* Modal content */
.wmc-modal-heading {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a2e;
    letter-spacing: 0.3px;
}

.wmc-modal-sub {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 18px;
    line-height: 1.6;
}

.wmc-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.wmc-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wmc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.wmc-btn-yes {
    background: #10b981;
    color: #fff;
}

.wmc-btn-yes:hover { 
    background: #059669;
}

.wmc-btn-no {
    background: #ef4444;
    color: #fff;
}

.wmc-btn-no:hover { 
    background: #dc2626;
}

.wmc-btn-ok {
    background: #3b82f6;
    color: #fff;
}

.wmc-btn-ok:hover { 
    background: #2563eb;
}

/* Info box */
.wmc-info-box {
    background: linear-gradient(135deg, #f0f6ff 0%, #f5faff 100%);
    border: 1px solid #b8cfe8;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 16px 0;
    font-size: 0.9em;
    color: #1a3a5c;
    line-height: 1.7;
}

.wmc-info-box ol {
    margin: 12px 0 12px 20px;
    padding: 0;
}

.wmc-info-email {
    font-weight: 700;
    color: #2d5fa5;
    font-size: 1.05em;
    word-break: break-word;
}

.wmc-warning-text {
    font-size: 0.85em;
    color: #dc2626;
    margin-top: 14px;
    line-height: 1.6;
    padding: 12px;
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    border-radius: 4px;
}

/* Sorry box */
.wmc-sorry-box {
    background: linear-gradient(135deg, #fef2f2 0%, #fefafb 100%);
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 14px 0;
    color: #991b1b;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Admin remove confirm */
.wmc-admin-info {
    font-size: 0.85em;
    color: #888;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    #wmc-modal {
        max-width: 95vw;
        border-radius: 10px;
    }

    #wmc-modal-content {
        padding: 28px 24px;
    }

    .wmc-modal-heading {
        font-size: 1.2em;
    }

    .wmc-modal-buttons {
        flex-direction: column;
    }

    .wmc-btn {
        width: 100%;
    }

    .wmc-form-container {
        padding: 16px;
        margin: 16px 0 8px 0;
    }
}

@media (max-width: 600px) {
    #wmc-overlay {
        padding: 16px;
    }

    #wmc-grid {
        gap: 3px;
    }

    .wmc-day {
        min-height: 65px;
        padding: 5px;
    }

    .wmc-status-label {
        font-size: 0.62em;
    }

    #wmc-modal {
        max-height: 85vh;
    }

    #wmc-modal-content {
        padding: 24px 20px;
    }

    .wmc-modal-heading {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .wmc-modal-sub {
        font-size: 0.9em;
        margin-bottom: 14px;
    }

    .wmc-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .wmc-title {
        font-size: 1.5em;
    }
}
