/**
 * GYGSA Registration Form Stylesheet
 */

/* ============================================
   FORM WRAPPER & LAYOUT
   ============================================ */

.gygsa-registration-form {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gygsa-registration-form h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #1e73be;
    margin-bottom: 10px;
}

.gygsa-registration-form .form-intro {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ============================================
   FORM SECTIONS
   ============================================ */

.registration-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #e9ecef;
}

.registration-section:last-of-type {
    border-bottom: none;
}

.registration-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #1e73be;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1e73be;
    display: inline-block;
}

/* ============================================
   FORM FIELDS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label .required {
    color: #be1e1e;
    font-weight: 700;
    margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #1e73be;
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* ============================================
   FORM ROWS (Multi-column layouts)
   ============================================ */

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

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

/* ============================================
   CHILD REGISTRATION FIELDS
   ============================================ */

.child-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 5px solid #1e73be;
}

.child-wrapper h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #1e73be;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-child-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-child-btn:hover {
    background-color: #c82333;
}

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

/* SKU Display */
.sku-display {
    background: #e7f3ff;
    border: 2px solid #1e73be;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.sku-display label {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
    margin: 0;
}

.sku-display .sku-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1e73be;
}

.sku-display .sku-details {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
}

/* ============================================
   ADD CHILD BUTTON
   ============================================ */

.add-child-wrapper {
    text-align: center;
    margin: 30px 0;
}

.add-child-btn {
    background-color: #1e73be;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-child-btn:hover {
    background-color: #be1e1e;
    box-shadow: 0 0 10px rgba(190, 30, 30, 0.3);
    transform: translateY(-2px);
}

.add-child-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.child-count {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* ============================================
   CONSENT CHECKBOXES
   ============================================ */

.consent-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 12px;
}

.consent-item input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    cursor: pointer;
    accent-color: #1e73be;
}

.consent-item label {
    font-size: 14px;
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.5;
}

.consent-item label a {
    color: #1e73be;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.consent-item label a:hover {
    color: #be1e1e;
    text-decoration: underline;
}

.consent-item .required {
    display: inline-block;
    color: #be1e1e;
    font-weight: 700;
    margin-left: 4px;
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions button {
    flex: 1;
    padding: 14px 24px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-actions .submit-btn {
    background-color: #1e73be;
    color: #fff;
}

.form-actions .submit-btn:hover {
    background-color: #be1e1e;
    box-shadow: 0 0 10px rgba(190, 30, 30, 0.3);
    transform: translateY(-2px);
}

.form-actions .reset-btn {
    background-color: #dee2e6;
    color: #333;
}

.form-actions .reset-btn:hover {
    background-color: #ccc;
}

/* ============================================
   VALIDATION & MESSAGES
   ============================================ */

.form-error {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-error.show {
    display: block;
}

.form-error ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.form-error li {
    margin-bottom: 5px;
}

.form-error li:last-child {
    margin-bottom: 0;
}

.field-error input,
.field-error textarea,
.field-error select {
    border-color: #be1e1e !important;
    box-shadow: 0 0 0 3px rgba(190, 30, 30, 0.1) !important;
}

.field-error .error-message {
    display: block;
    color: #be1e1e;
    font-size: 12px;
    margin-top: 5px;
}

/* ============================================
   LOADING & SUCCESS STATES
   ============================================ */

.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1e73be;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .gygsa-registration-form {
        padding: 20px;
    }

    .gygsa-registration-form h2 {
        font-size: 24px;
    }

    .registration-section h3 {
        font-size: 18px;
    }

    .form-row,
    .form-row.three-col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .child-wrapper {
        padding: 15px;
    }

    .consent-section {
        padding: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gygsa-registration-form {
        padding: 15px;
    }

    .gygsa-registration-form h2 {
        font-size: 20px;
    }

    .registration-section {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .registration-section h3 {
        font-size: 16px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
    }

    .sku-display .sku-value {
        font-size: 18px;
    }

    .child-wrapper h4 {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .remove-child-btn {
        align-self: flex-end;
    }
}
/* ============================================
   CONSENT SECTION RESPONSIVE FIX
   ============================================ */
.gygsa-registration-form .consent-item {
    display: block;
}

.gygsa-registration-form .consent-checkbox {
    width: 100%;
}