/* Waiver Modal Styles - Muscle Recovery LLC */

.waiver-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.waiver-modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.waiver-modal {
    background: white;
    border-radius: 12px;
    max-width: 850px;
    width: 100%;
    margin: 20px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: waiverSlideIn 0.3s ease;
}

@keyframes waiverSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.waiver-header {
    background: linear-gradient(135deg, #2fb5d2 0%, #1a8ca0 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
}

.waiver-header h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.waiver-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.waiver-content {
    padding: 30px;
    max-height: 65vh;
    overflow-y: auto;
}

/* Waiver Text Styles */
.waiver-text {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
}

.waiver-text .waiver-intro {
    background: #e8f4f8;
    border-left: 4px solid #2fb5d2;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.waiver-text .waiver-intro p {
    margin: 8px 0;
}

.waiver-text .waiver-title {
    color: #333;
    font-size: 18px;
    text-align: center;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2fb5d2;
}

.waiver-text .waiver-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.waiver-text .waiver-warning p {
    margin: 5px 0;
    color: #856404;
}

.waiver-text .waiver-body p {
    margin: 12px 0;
}

.waiver-text .waiver-body ul {
    margin: 10px 0;
    padding-left: 25px;
}

.waiver-text .waiver-body li {
    margin: 8px 0;
}

.waiver-text .waiver-emphasis {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 12px 15px;
    margin: 15px 0;
    font-weight: 500;
}

.waiver-text .waiver-final-acknowledgment {
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.waiver-text .waiver-final-acknowledgment p {
    margin: 0;
    color: #c62828;
}

/* Form Sections */
.waiver-form-section {
    margin-bottom: 20px;
}

.waiver-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.waiver-form-group {
    margin-bottom: 15px;
}

.waiver-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.waiver-form-group label .required {
    color: #dc3545;
}

.waiver-form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.waiver-form-group input,
.waiver-form-group select,
.waiver-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.waiver-form-group input:focus,
.waiver-form-group select:focus,
.waiver-form-group textarea:focus {
    border-color: #2fb5d2;
    outline: none;
}

/* Signature Section */
.signature-section {
    background: #f0f8ff;
    border: 2px solid #2fb5d2;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.signature-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 25px;
    align-items: start;
}

.signature-field label,
.date-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.signature-pad-container {
    background: white;
    border-radius: 8px;
    padding: 5px;
}

.signature-pad {
    border: 2px solid #333;
    border-radius: 6px;
    background: white;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    height: 150px;
}

.signature-pad.signed {
    border-color: #28a745;
    background: #f8fff8;
}

.signature-actions {
    margin-top: 10px;
    text-align: center;
}

.btn-clear-signature {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-clear-signature:hover {
    background: #5a6268;
}

.date-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.date-field input:focus {
    border-color: #2fb5d2;
    outline: none;
}

/* Initials Declaration */
.initials-declaration {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.declaration-text {
    flex: 1;
    min-width: 200px;
}

.declaration-text label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.initials-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.initials-field label {
    font-weight: 600;
    color: #333;
}

.initials-canvas {
    border: 2px solid #333;
    border-radius: 4px;
    background: white;
    cursor: crosshair;
    touch-action: none;
    width: 100px;
    height: 50px;
}

.initials-canvas.signed {
    border-color: #28a745;
    background: #f8fff8;
}

.btn-clear-initials {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-clear-initials:hover {
    background: #c82333;
}

/* Agreement Checkbox */
.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.agreement-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #4caf50;
    flex-shrink: 0;
}

.agreement-checkbox label {
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    color: #333;
}

/* Footer */
.waiver-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.waiver-footer .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.waiver-footer .btn-cancel {
    background: #6c757d;
    color: white;
}

.waiver-footer .btn-cancel:hover {
    background: #5a6268;
}

.waiver-footer .btn-submit {
    background: #28a745;
    color: white;
}

.waiver-footer .btn-submit:hover {
    background: #218838;
}

.waiver-footer .btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Progress indicator */
.waiver-progress {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
}

.waiver-progress span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.waiver-progress .check {
    color: #28a745;
}

.waiver-progress .pending {
    color: #ccc;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .waiver-modal {
        margin: 10px;
        max-width: none;
    }
    
    .waiver-content {
        padding: 20px;
        max-height: 70vh;
    }
    
    .waiver-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .signature-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .signature-pad {
        height: 120px;
    }
    
    .initials-declaration {
        flex-direction: column;
        text-align: center;
    }
    
    .waiver-footer {
        flex-direction: column;
    }
    
    .waiver-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .waiver-progress {
        justify-content: center;
        width: 100%;
    }
}
