/**
 * Point Web Waiver Manager - Modal Styles
 */

.pww-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pww-modal-overlay.pww-active { opacity: 1; visibility: visible; }

.pww-modal {
    background: #fff; border-radius: 12px;
    max-width: 800px; width: 100%; max-height: 90vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px); transition: transform 0.3s ease;
}

.pww-active .pww-modal { transform: translateY(0); }

.pww-modal-header {
    padding: 24px 32px 16px;
    border-bottom: 2px solid var(--pww-primary, #1e40af);
    flex-shrink: 0;
}

.pww-modal-header h2 {
    margin: 0; font-size: 22px;
    color: var(--pww-primary, #1e40af); font-weight: 700;
}

.pww-modal-header .pww-subtitle {
    margin: 8px 0 0; color: #6b7280; font-size: 14px;
}

.pww-progress-bar { height: 4px; background: #e5e7eb; position: relative; overflow: hidden; }
.pww-progress-fill { height: 100%; background: var(--pww-primary, #1e40af); width: 0%; transition: width 0.2s ease; }

.pww-modal-body {
    flex: 1; overflow-y: auto; padding: 24px 32px;
    line-height: 1.6; color: #1f2937;
}

.pww-modal-body h3 { color: var(--pww-primary, #1e40af); margin-top: 24px; margin-bottom: 12px; font-size: 17px; }
.pww-modal-body h4 { margin-top: 20px; margin-bottom: 8px; font-size: 15px; }
.pww-modal-body p { margin: 0 0 12px; }
.pww-modal-body strong { color: #111827; }

.pww-section-block-modal { margin-bottom: 18px; }
.pww-section-block-modal h4 { color: var(--pww-primary, #1e40af); }

.pww-form-section {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 20px; margin-bottom: 16px;
}

.pww-form-section h3 { margin-top: 0; color: var(--pww-primary, #1e40af); }

.pww-field { margin-bottom: 14px; }
.pww-field label { display: block; font-weight: 600; margin-bottom: 4px; color: #374151; font-size: 14px; }
.pww-field input, .pww-field select {
    width: 100%; padding: 10px 12px; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 16px; background: #fff; box-sizing: border-box;
}
.pww-field input:focus, .pww-field select:focus {
    outline: none; border-color: var(--pww-primary, #1e40af);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.pww-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pww-companion-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 6px;
    padding: 16px; margin-bottom: 12px; position: relative;
}

.pww-companion-remove {
    position: absolute; top: 8px; right: 8px;
    background: #fee2e2; border: none; color: #dc2626;
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; font-weight: bold;
}

.pww-add-companion-btn {
    background: transparent; border: 2px dashed #d1d5db;
    color: #6b7280; padding: 12px 20px; width: 100%;
    border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.2s;
}
.pww-add-companion-btn:hover { border-color: var(--pww-primary, #1e40af); color: var(--pww-primary, #1e40af); }

.pww-modal-footer {
    padding: 20px 32px; border-top: 1px solid #e5e7eb;
    background: #f9fafb; flex-shrink: 0;
}

.pww-scroll-hint {
    text-align: center; color: #6b7280; font-size: 13px; margin: 0 0 12px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pww-scroll-hint.pww-hidden { display: none; }

.pww-accept-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.pww-accept-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; }
.pww-accept-row label { color: #374151; line-height: 1.5; cursor: pointer; flex: 1; }
.pww-accept-row input[type="checkbox"]:disabled + label { color: #9ca3af; cursor: not-allowed; }

.pww-buttons { display: flex; gap: 12px; justify-content: flex-end; }

.pww-btn {
    padding: 12px 24px; border-radius: 8px; font-size: 15px;
    font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.pww-btn-primary { background: var(--pww-primary, #1e40af); color: #fff; }
.pww-btn-primary:hover:not(:disabled) { background: #1e3a8a; transform: translateY(-1px); }
.pww-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.pww-btn-secondary { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.pww-btn-secondary:hover { background: #f9fafb; }

.pww-error {
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
    padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
}

.pww-loading {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: pww-spin 0.8s linear infinite; margin-right: 8px;
}
@keyframes pww-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .pww-modal { max-height: 100vh; border-radius: 0; }
    .pww-modal-overlay { padding: 0; }
    .pww-modal-header, .pww-modal-body, .pww-modal-footer { padding-left: 16px; padding-right: 16px; }
    .pww-field-row { grid-template-columns: 1fr; }
    .pww-buttons { flex-direction: column-reverse; }
    .pww-btn { width: 100%; }
}
