/*
 * guest_inquiry_modal.css
 * 비회원 문의 모달 — 모달 특화 레이아웃만 담당
 *
 * DS 컴포넌트 시각 속성(border/background/color 등)은 건드리지 않음.
 * 폼 컴포넌트 시각은 ptbwa-ds-components.css가 담당.
 * 색상은 ptbwa-ds semantic token 참조.
 */

@supports (scrollbar-gutter: stable) {
    html.guest-inquiry-modal-open {
        scrollbar-gutter: stable;
    }

    html.guest-inquiry-modal-open body.modal-open {
        padding-right: 0 !important;
    }
}

#guestInquiryModal {
    z-index: 1000000 !important;
}

#guestInquiryModal .guestinq-dialog {
    max-width: 480px;
    width: calc(100% - 32px);
    margin: 60px auto 40px;
}

#guestInquiryModal .guestinq-modal-content {
    background: var(--ptbwa-ds-color-surface-white);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(17, 24, 39, 0.22);
    overflow: hidden;
    min-height: 660px;
}

#guestInquiryModal .guestinq-body {
    padding: 0;
}

#guestInquiryModal .guestinq-form {
    padding: 24px;
    box-sizing: border-box;
    font-family: var(--ptbwa-ds-font-family-primary), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ptbwa-ds-color-text-secondary);
    -webkit-font-smoothing: antialiased;
}

#guestInquiryModal .guestinq-form *,
#guestInquiryModal .guestinq-form *::before,
#guestInquiryModal .guestinq-form *::after {
    box-sizing: border-box;
}

#guestInquiryModal .guestinq-form .ptbwa-ds-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.43;
}

#guestInquiryModal .guestinq-form .ptbwa-ds-input {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.43;
}

#guestInquiryModal .guestinq-form .ptbwa-ds-error,
#guestInquiryModal .guestinq-counter {
    font-size: 12px;
    line-height: 1.4;
}

#guestInquiryModal .guestinq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

#guestInquiryModal .guestinq-title {
    flex: 1;
    font-size: 20px;
    line-height: 1.3;
    font-weight: var(--ptbwa-ds-font-weight-bold);
    margin: 0;
    color: var(--ptbwa-ds-color-text-primary);
}

#guestInquiryModal .guestinq-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: var(--ptbwa-ds-color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

#guestInquiryModal .guestinq-close:hover {
    color: var(--ptbwa-ds-color-action-primary);
}

#guestInquiryModal .guestinq-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

#guestInquiryModal .guestinq-field-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

#guestInquiryModal .guestinq-counter {
    font-size: 12px;
    line-height: 1.4;
    color: var(--ptbwa-ds-color-text-muted);
    flex-shrink: 0;
    margin-top: 4px;
}

#guestInquiryModal .guestinq-agreements {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 20px;
}

#guestInquiryModal .guestinq-agreement-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    padding: 6px 0;
    font-size: var(--ptbwa-ds-font-size-sm);
    line-height: 1.4;
    margin: 0;
    color: var(--ptbwa-ds-color-text-secondary);
    cursor: pointer;
    flex-wrap: wrap;
}

#guestInquiryModal .guestinq-agreement-row strong {
    font-weight: var(--ptbwa-ds-font-weight-medium);
    color: var(--ptbwa-ds-color-text-primary);
}

#guestInquiryModal .guestinq-detail-btn {
    background: transparent;
    border: 0;
    color: var(--ptbwa-ds-color-action-primary);
    font-size: 13px;
    line-height: 1.4;
    font-weight: var(--ptbwa-ds-font-weight-medium);
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    font-family: inherit;
}

#guestInquiryModal .guestinq-detail-btn:hover {
    text-decoration: underline;
}

#guestInquiryModal .guestinq-screen[hidden] {
    display: none !important;
}

/* ===== Privacy screen ===== */

#guestInquiryModal .guestinq-privacy-screen {
    display: flex;
    flex-direction: column;
    min-height: 660px;
    padding: 0 24px 24px;
}

#guestInquiryModal .guestinq-privacy-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 0 16px;
}

#guestInquiryModal .guestinq-privacy-header h3 {
    flex: 1;
    font-size: var(--ptbwa-ds-font-size-heading3);
    line-height: 1.3;
    font-weight: var(--ptbwa-ds-font-weight-bold);
    margin: 0;
    color: var(--ptbwa-ds-color-text-primary);
}

#guestInquiryModal .guestinq-privacy-back,
#guestInquiryModal .guestinq-privacy-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: var(--ptbwa-ds-color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

#guestInquiryModal .guestinq-privacy-back {
    font-size: 24px;
}

#guestInquiryModal .guestinq-privacy-close:hover {
    color: var(--ptbwa-ds-color-action-primary);
}

#guestInquiryModal .guestinq-privacy-body {
    flex: 1 1 auto;
    padding: 0 0 16px;
    max-height: 60vh;
    overflow-y: auto;
}

#guestInquiryModal .guestinq-privacy-intro {
    font-size: var(--ptbwa-ds-font-size-sm);
    line-height: 1.5;
    color: var(--ptbwa-ds-color-text-secondary);
    margin: 16px 0;
}

#guestInquiryModal .guestinq-privacy-section {
    margin-bottom: 16px;
}

#guestInquiryModal .guestinq-privacy-section h4 {
    font-size: var(--ptbwa-ds-font-size-sm);
    font-weight: var(--ptbwa-ds-font-weight-bold);
    color: var(--ptbwa-ds-color-text-primary);
    margin: 0 0 8px;
}

#guestInquiryModal .guestinq-privacy-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#guestInquiryModal .guestinq-privacy-section li {
    font-size: var(--ptbwa-ds-font-size-sm);
    line-height: 1.5;
    color: var(--ptbwa-ds-color-text-secondary);
    padding-left: 12px;
    position: relative;
}

#guestInquiryModal .guestinq-privacy-section li::before {
    content: "·";
    position: absolute;
    left: 0;
}

#guestInquiryModal .guestinq-privacy-notice {
    font-size: var(--ptbwa-ds-font-size-xs);
    line-height: 1.5;
    color: var(--ptbwa-ds-color-text-muted);
    margin: 16px 0 0;
}

#guestInquiryModal .guestinq-privacy-footer {
    margin-top: auto;
    padding: 0;
    display: flex;
}

#guestInquiryModal .guestinq-privacy-footer button {
    width: 100%;
    min-width: 0;
}

/* Modal-scoped button: full-width + local typography for ptbwa-ds.css button component */
#guestInquiryModal .ptbwa-ds-button {
    width: 100%;
    font-size: var(--ptbwa-ds-font-size-base);
    font-weight: var(--ptbwa-ds-font-weight-bold);
}

/* ===== Toast ===== */

.guestinq-toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000001;
    pointer-events: none;
}

.guestinq-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ptbwa-ds-color-gray-900);
    color: var(--ptbwa-ds-color-action-on-primary);
    border-radius: 8px;
    font-size: var(--ptbwa-ds-font-size-sm);
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.guestinq-toast button {
    background: transparent;
    border: 0;
    color: var(--ptbwa-ds-color-action-on-primary);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

.guestinq-toast button:hover {
    opacity: 1;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    #guestInquiryModal .guestinq-dialog {
        max-width: none;
        width: 100%;
        height: 100dvh;
        margin: 0;
    }

    #guestInquiryModal .guestinq-modal-content,
    #guestInquiryModal .guestinq-body {
        height: 100%;
        border-radius: 0;
    }

    #guestInquiryModal .guestinq-modal-content {
        min-height: 0;
    }

    #guestInquiryModal .guestinq-body {
        overflow-y: auto;
    }

    #guestInquiryModal .guestinq-form,
    #guestInquiryModal .guestinq-privacy-screen {
        min-height: 100%;
    }

    #guestInquiryModal .guestinq-form {
        padding: 20px;
    }

    #guestInquiryModal .guestinq-title {
        font-size: 18px;
    }

    #guestInquiryModal .guestinq-form .ptbwa-ds-input {
        font-size: 15px;
    }

    #guestInquiryModal .guestinq-form .ptbwa-ds-input:not(.ptbwa-ds-textarea) {
        height: 48px;
    }

    #guestInquiryModal .guestinq-privacy-screen {
        padding: 0 16px 20px;
    }

    #guestInquiryModal .guestinq-privacy-header {
        padding: 20px 0 12px;
    }

    #guestInquiryModal .guestinq-privacy-body {
        padding: 0 0 12px;
    }

    #guestInquiryModal .guestinq-privacy-footer {
        padding: 0;
    }

    .guestinq-toast {
        max-width: calc(100% - 32px);
        flex-wrap: wrap;
    }
}
