/* static/css/calendar_schedule_mailto_modal.css */

.current-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
}

.current-action-grid button {
    width: 100%;
    min-height: 2rem;
}

.schedule-mailto-open-button {
    display: inline-block;
}

.schedule-mailto-open-button:disabled,
.schedule-link-open-button:disabled,
.preview-modal-open-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.schedule-mailto-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    font-family: 'M PLUS 1p', sans-serif;
}

.schedule-mailto-modal.is-open {
    display: block;
}

.schedule-mailto-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.schedule-mailto-modal__dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 680px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transform: translate(-50%, -50%);
}

.schedule-mailto-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    cursor: move;
    user-select: none;
}

.schedule-mailto-modal__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.schedule-mailto-modal__close {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.schedule-mailto-modal__close:hover {
    background: #e5e7eb;
}

.schedule-mailto-modal__body {
    flex: 1;
    padding: 1.25rem;
    overflow: auto;
}

.schedule-mailto-modal__notice {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.45rem;
    background: #f9fafb;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.6;
}

.schedule-mailto-modal__field {
    margin-bottom: 1rem;
}

.schedule-mailto-modal__field label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: bold;
}

.schedule-mailto-modal__field input,
.schedule-mailto-modal__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.45rem;
    font-size: 1rem;
    font-family: inherit;
}

.schedule-mailto-modal__field textarea {
    resize: vertical;
}

.schedule-mailto-modal__help {
    margin: 0.35rem 0 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.schedule-mailto-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: move;
    user-select: none;
}

.schedule-mailto-modal__button {
    min-width: 8rem;
    padding: 0.7rem 1rem;
    border-radius: 0.45rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.schedule-mailto-modal__button--secondary {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #111827;
}

.schedule-mailto-modal__button--primary {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.schedule-mailto-modal__button--gmail {
    border: 1px solid #e88880;
    background: #f28b82;
    color: #ffffff;
}

.schedule-mailto-modal__button--primary:hover,
.schedule-mailto-modal__button--secondary:hover,
.schedule-mailto-modal__button--gmail:hover {
    opacity: 0.9;
}

.schedule-mailto-modal__resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 10;
}

.schedule-mailto-modal__resize-handle--nw {
    top: 0; left: 0;
    cursor: nw-resize;
    border-top: 3px solid #aaaaaa;
    border-left: 3px solid #aaaaaa;
    border-radius: 0.4rem 0 0 0;
}

.schedule-mailto-modal__resize-handle--ne {
    top: 0; right: 0;
    cursor: ne-resize;
    border-top: 3px solid #aaaaaa;
    border-right: 3px solid #aaaaaa;
    border-radius: 0 0.4rem 0 0;
}

.schedule-mailto-modal__resize-handle--sw {
    bottom: 0; left: 0;
    cursor: sw-resize;
    border-bottom: 3px solid #aaaaaa;
    border-left: 3px solid #aaaaaa;
    border-radius: 0 0 0 0.4rem;
}

.schedule-mailto-modal__resize-handle--se {
    bottom: 0; right: 0;
    cursor: se-resize;
    border-bottom: 3px solid #aaaaaa;
    border-right: 3px solid #aaaaaa;
    border-radius: 0 0 0.4rem 0;
}

@media only screen and (max-width: 768px) {
    .current-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .schedule-mailto-modal__dialog {
        left: 8px;
        top: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        max-width: none;
        max-height: none;
        transform: none;
        border-radius: 10px;
    }

    .schedule-mailto-modal__header {
        cursor: default;
    }

    .schedule-mailto-modal__footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        cursor: default;
    }

    .schedule-mailto-modal__button--secondary {
        grid-column: 1 / -1;
    }

    .schedule-mailto-modal__button {
        width: 100%;
        min-width: unset;
    }

    .schedule-mailto-modal__resize-handle {
        display: none;
    }
}