/* CalManager — Calendly-style booking widget (MGE / MyGreenEnergy) */

.mge-cm {
    font-family: inherit;
    max-width: 880px;
    margin: 0 auto;
    color: #1f2937;
}

.mge-cm .cm-loading {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.mge-cm .cm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

@media (max-width: 640px) {
    .mge-cm .cm-grid { grid-template-columns: 1fr; }
}

.mge-cm .cm-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.mge-cm .cm-cal-header button {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.mge-cm .cm-cal-header button:disabled { opacity: .4; cursor: not-allowed; }

.mge-cm .cm-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 0.9rem;
}

.mge-cm .cm-dow {
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    padding: 6px 0;
}

.mge-cm .cm-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: #1f2937;
    user-select: none;
}
.mge-cm .cm-day.cm-empty { visibility: hidden; }
.mge-cm .cm-day.cm-disabled { color: #d1d5db; cursor: not-allowed; }
.mge-cm .cm-day:not(.cm-disabled):not(.cm-empty):hover { background: #e0f2fe; }
.mge-cm .cm-day.cm-selected { background: #009fda; color: #fff; }
.mge-cm .cm-day.cm-today { font-weight: 700; }

.mge-cm .cm-slots h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
}

.mge-cm .cm-slot-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.mge-cm .cm-slot {
    padding: 8px;
    border: 1px solid #009fda;
    color: #009fda;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    font-weight: 500;
}
.mge-cm .cm-slot:hover { background: #e0f2fe; }
.mge-cm .cm-slot.cm-selected { background: #009fda; color: #fff; }

.mge-cm .cm-empty-msg {
    color: #6b7280;
    font-style: italic;
    padding: 1rem 0;
}
.mge-cm .cm-empty-msg.cm-empty-sub {
    padding-top: 0.25rem;
    font-style: normal;
    font-weight: 500;
    color: #374151;
}

.mge-cm .cm-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    grid-column: 1 / -1;
}
.mge-cm .cm-form label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.25rem;
}
.mge-cm .cm-form input,
.mge-cm .cm-form textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font: inherit;
    box-sizing: border-box;
}
.mge-cm .cm-form textarea { resize: vertical; min-height: 70px; }

.mge-cm .cm-btn {
    background: #009fda;
    color: #fff;
    border: 0;
    padding: 11px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.mge-cm .cm-btn:disabled { opacity: .6; cursor: progress; }

.mge-cm .cm-success, .mge-cm .cm-error {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}
.mge-cm .cm-success { background: #d1fae5; color: #065f46; }
.mge-cm .cm-error   { background: #fee2e2; color: #991b1b; }

.mge-cm-blocked {
    max-width: 720px; margin: 0 auto;
    padding: 2rem; border: 1px solid #e5e7eb; border-radius: 12px;
    background: #fff; text-align: center; color: #1f2937;
}
.mge-cm-blocked .icon { font-size: 2rem; margin-bottom: .5rem; }
.mge-cm-blocked h3    { margin: 0; font-size: 1.15rem; font-weight: 600; }
