/* css/signup.css */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

h1 {margin-top: 10px;}

/* MODIFIED: Default style for EXTRA-LARGE screens (wider than 1400px) */
.signup-container {
    max-width: 50%;
    background-color: #ffffff;
    border-radius: 8px;
}

/* MODIFIED: Style for LARGE screens (up to 1400px) */
@media (max-width: 1400px) {
    .signup-container {
        max-width: 75%;
        background-color: #ffffff;
        border-radius: 8px;
    }
}

/* MODIFIED: Style for TABLET/MOBILE screens (992px or less) */
@media (max-width: 992px) {
    .signup-container {
        max-width: 95%;
        background-color: #ffffff;
        border-radius: 8px;
    }
}

.section-heading { 
    font-size: 1.3em; 
    font-weight: 600; 
    color: #16a34a; 
    margin-top: 10px; 
    margin-bottom: 0;
    padding-bottom: 5px; 
    display: flex; 
    align-items: center; 
}
.section-heading .fas { 
    margin-right: 10px; 
    color: #16a34a; 
    font-size: 1em; 
}

.page-message { margin-bottom: 20px !important; }

.plan-confirmation-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #e6fffa 100%);
    border: 2px solid #16a34a;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
    position: relative;
    overflow: hidden;
}

.plan-confirmation-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #16a34a, #22c55e, #16a34a);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.plan-badge {
    display: flex;
    align-items: center;
    background: #16a34a;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.plan-badge .fas {
    margin-right: 8px;
    color: #fbbf24;
}

.plan-name {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-price {
    font-size: 1.8em;
    font-weight: 700;
    color: #16a34a;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.price-period {
    font-size: 0.6em;
    font-weight: 400;
    color: #6b7280;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.plan-features {
    font-size: 0.95em;
    color: #374151;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.change-plan-link {
    background: #ffffff;
    color: #16a34a;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid #16a34a;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.change-plan-link:hover {
    background: #16a34a;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.2);
}

@media (max-width: 768px) {
    .plan-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .plan-details {
        flex-direction: column;
        text-align: center;
    }
    
    .plan-features {
        text-align: center;
    }
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.form-group {
    flex-grow: 1;
    flex-basis: 100%;
    min-width: 0;
    margin-bottom: 18px;
}
.form-group:last-child,
.form-row > .form-group:last-child {
    margin-bottom: 0;
}

/* Address field specific widths */
@media (min-width: 1000px) {
    .form-group.address-field {
        flex-basis: calc(40% - 15px);
    }
    .form-group.city-field {
        flex-basis: calc(30% - 15px);
    }
    .form-group.state-field {
        flex-basis: calc(15% - 15px);
    }
    .form-group.zip-field {
        flex-basis: calc(15% - 15px);
    }
}

/* Responsive field widths */
@media (min-width: 1200px) {
    .form-group.half-width {
        flex-basis: calc(50% - 10px);
    }
    .form-group.third-width {
        flex-basis: calc(33.333% - 14px);
    }
    .form-group.quarter-width {
        flex-basis: calc(25% - 15px);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .form-group.half-width {
        flex-basis: calc(50% - 10px);
    }
    .form-group.third-width {
        flex-basis: calc(50% - 10px);
    }
    .form-group.quarter-width {
        flex-basis: calc(50% - 10px);
    }
}

@media (min-width: 768px) and (max-width: 999px) {
    .form-group.address-field {
        flex-basis: calc(50% - 10px);
    }
    .form-group.city-field {
        flex-basis: calc(50% - 10px);
    }
    .form-group.state-field {
        flex-basis: calc(50% - 10px);
    }
    .form-group.zip-field {
        flex-basis: calc(50% - 10px);
    }
}

@media (max-width: 767px) {
    .form-row {
        gap: 15px;
    }
    .form-group.half-width,
    .form-group.third-width,
    .form-group.quarter-width,
    .form-group.address-field,
    .form-group.city-field,
    .form-group.state-field,
    .form-group.zip-field {
        flex-basis: 100%;
    }
    .stripe-elements-row {
        flex-direction: column;
        gap: 10px;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9em;
    color: #495057;
}
.form-group label .required {
    color: #dc3545;
    margin-left: 2px;
    font-weight: bold;
}
.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    outline: none;
}
.form-group small {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 6px;
    line-height: 1.3;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}
.form-check { 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
}

/* MODIFIED: Custom Checkbox Styling */
.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

.form-check-input:checked {
    background-color: #16a34a;
    border-color: #15803d;
}

.form-check-input:checked::after {
    content: '\2713';
    color: white;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
    color: #495057;
    font-weight: normal;
}

.terms-agreement { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.terms-notice { font-size: 0.85em; color: #6c757d; }
.terms-notice a { color: #005A9C; text-decoration: underline; }

.promo-container { display: flex; gap: 10px; align-items: flex-end; }
.promo-container .form-group { flex-grow: 1; margin-bottom: 0; }
.promo-status { margin-top: 10px; font-size: 0.9em; font-weight: 500; }
.promo-status.success { color: #15803d; }
.promo-status.error { color: #b91c1c; }

.stripe-element { 
    box-sizing: border-box; height: 40px; padding: 10px 12px; 
    border: 1px solid #cbd5e0; border-radius: 4px; background-color: white;
}

/* Hide Stripe Link */
.p-Link {
    display: none !important;
}
.stripe-elements-row { display: flex; gap: 10px; }
.stripe-elements-row > div { flex: 1; }

@media (max-width: 1199px) {
    .stripe-elements-row {
        margin-top: 10px;
    }
}

input.is-invalid, select.is-invalid, .stripe-element.is-invalid {
    border: 2px solid #dc3545 !important;
}
input.is-valid, select.is-valid, .stripe-element.is-valid {
    border: 1px solid #16a34a !important;
}