/* Waiver System Styles - Single Page Layout */

.waiver-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* Auto-save status indicators */
.save-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    font-weight: normal;
}

.waiver-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
    border-radius: 10px;
}

.waiver-header h1 {
    margin: 0;
    font-size: 32px;
}

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

/* Form Sections */
.form-section {
    background: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-card {
    background: #f7fafc;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.section-card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #cbd5e0;
}

.section-card h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

/* Form Groups and Rows */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4a5568;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Info Display (for existing data) */
.info-display {
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
}

.info-display strong {
    color: #4a5568;
    margin-right: 5px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Children Table */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    position: relative;
}

.children-table {
    width: 100%;
    border-collapse: collapse;
}

.children-table thead {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
}

.children-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.children-table td {
    padding: 14px 16px;
    color: #2d3748;
    font-size: 15px;
}

.children-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.children-table tbody tr:hover {
    background-color: #f7fafc;
}

.children-table tbody tr:last-child {
    border-bottom: none;
}

.child-number {
    font-weight: 600;
    color: #667eea;
}

.existing-child-row {
    background: white;
}

.new-child-row {
    background: linear-gradient(to right, #f0f9ff, #ffffff);
    position: relative;
}

.existing-child-row {
    position: relative;
}

/* Floating remove button */
.remove-btn-float {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f56565;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.remove-btn-float:hover {
    background: #e53e3e;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}


.empty-message {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 30px !important;
}

/* Add Child Form */
.add-child-form-container {
    background: #f8fafc;
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
}

.add-child-form-container h4 {
    color: #4a5568;
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

/* Inline form layout */
.form-inline-wrapper {
    white-space: nowrap;
}

.inline-field {
    display: inline-block;
    vertical-align: top;
    margin-right: 12px;
    white-space: normal;
}

.inline-field label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #4a5568;
    font-size: 12px;
}

.inline-field .form-control {
    width: 140px;
    padding: 8px 10px;
    font-size: 13px;
}

.inline-field .btn {
    height: 38px;
    padding: 8px 16px;
    vertical-align: top;
    font-size: 14px;
}

.add-child-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
    font-size: 13px;
}

.add-child-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.add-child-form .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Birthday inputs */
.birthday-inputs {
    display: inline-block;
}

.birthday-field {
    padding: 8px 6px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    transition: border-color 0.3s;
}

.birthday-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.birthday-field[id$="month"],
.birthday-field[id$="day"] {
    width: 45px;
}

.birthday-field.year-field {
    width: 65px;
}

.date-separator {
    color: #718096;
    font-size: 14px;
    font-weight: 400;
    margin: 0 2px;
}

/* Error messages */
.error-message {
    display: block;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

/* Responsive table */
@media (max-width: 768px) {
    .children-table {
        font-size: 13px;
    }
    
    .children-table th,
    .children-table td {
        padding: 10px 12px;
    }
    
    .form-inline-wrapper {
        white-space: normal;
    }
    
    .inline-field {
        display: block;
        margin-bottom: 15px;
    }
    
    .inline-field .form-control {
        width: 100%;
    }
    
    /* Removed along with main ::before rule
    .new-child-row::before {
        display: none;
    }
    */
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a67d8;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4a5568;
}

.btn-success {
    background: #48bb78;
    color: white;
    padding: 14px 30px;
    font-size: 18px;
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #e53e3e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Waiver Text Container */
.waiver-text-container {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.waiver-text-container h3 {
    color: #2d3748;
    margin-top: 20px;
    margin-bottom: 10px;
}

.waiver-text-container p {
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 15px;
}

/* Signature Section */
.signature-section {
    margin-top: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.checkbox-group {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-group label {
    display: inline;
    font-weight: normal;
    color: #2d3748;
    line-height: 1.5;
}

input.signature-input {
    font-family: 'Brush Script MT', cursive;
    font-size: 36px !important;
    padding: 10px 15px;
    border: 2px solid #667eea;
    background: white;
    line-height: 1.2;
    height: auto;
    width: 100%;
}

input.signature-input::placeholder {
    font-size: 27px;
    opacity: 0.5;
}

.signature-date {
    margin-top: 10px;
    font-size: 14px;
    color: #718096;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-warning {
    background: #feebc8;
    color: #7c2d12;
    border: 1px solid #fbd38d;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Message Container */
#message-container {
    margin: 20px 0;
}

#email-message {
    text-align: center;
}

/* Email Display (non-editable) */
.email-display {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #4a5568;
    font-size: 16px;
    min-height: 42px;
    display: flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .waiver-container {
        padding: 10px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .section-card {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .waiver-header h1 {
        font-size: 24px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Email Entry Section */
#email-entry {
    text-align: center;
}

#email-entry h2 {
    color: #2d3748;
    margin-bottom: 25px;
}

#email-entry p {
    color: #4a5568;
    margin-bottom: 20px;
}