/* Reorder Page Specific Styles */

:root {
    --cta-orange: #FE5A13;
    --brand-teal: #00A6A0;
    --light-bg: #F5F5F5;
    --error-red: #DC3545;
}

.page-section {
    padding: 60px 0px;
    margin: 0;
    font-family: 'Helvetica', sans-serif;
    background-color: var(--light-bg);
}

.form-wrapper {
    background-color: #ffffff;
    border-radius: 25px;
    padding: 40px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.main-form {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reorder-title {
    font-size: 25px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.step-intro-text {
    font-size: 15px;
    color: #555555;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #C2C2C2;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #C2C2C2;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background-color: var(--brand-teal);
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #555555;
    text-align: center;
}

.step.active .step-label {
    color: var(--brand-teal);
    font-weight: 600;
}

/* Form Steps */
.form-step {
    display: none;
    width: 100%;
    max-width: 800px;
}

.form-step.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 8px;
    display: block;
}

.form-label .req {
    color: #e53e3e;
}

.required-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 18px;
    margin-top: -8px;
}

.required-note .req {
    color: #e53e3e;
    font-weight: 700;
}

.form-hint {
    font-size: 12px;
    color: #777777;
    display: block;
    margin-top: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 15px;
    border: 2px solid #C2C2C2;
    background-color: #F5F5F5;
    font-size: 16px;
    font-family: 'Helvetica', sans-serif;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-control::placeholder {
    color: #C2C2C2;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-teal);
    background-color: #ffffff;
}

.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Field error state */
.form-group.has-error .form-control {
    border-color: var(--error-red) !important;
    background-color: #fff5f5;
}

.form-group.has-error .select2-container--default .select2-selection--single {
    border-color: var(--error-red) !important;
    background-color: #fff5f5 !important;
}

.form-group.has-error .shipping-options {
    outline: 2px solid var(--error-red);
    border-radius: 15px;
    padding: 5px;
}

.checkbox-label.has-error input[type="checkbox"] {
    outline: 2px solid var(--error-red);
    border-radius: 3px;
}

.field-error-msg {
    display: block;
    color: var(--error-red);
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23333' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ce4f49' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Select2 Styling */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 2px solid #C2C2C2 !important;
    border-radius: 15px !important;
    background-color: #F5F5F5 !important;
    padding: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 15px !important;
    padding-right: 45px !important;
    color: #1a1a1a !important;
    font-family: 'Helvetica', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999999 !important;
    font-weight: 400 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
    right: 15px !important;
    top: 2px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #333 transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--cta-orange) !important;
    background-color: #ffffff !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: var(--cta-orange) transparent transparent transparent !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 35px !important;
    font-size: 20px !important;
    color: #C2C2C2 !important;
    line-height: 44px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--cta-orange) !important;
}

/* Select2 Dropdown */
.select2-container--default .select2-dropdown {
    border: 2px solid var(--brand-teal) !important;
    border-radius: 15px !important;
    background-color: #ffffff !important;
    margin-top: 5px !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #C2C2C2 !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-family: 'Helvetica', sans-serif !important;
    font-size: 16px !important;
    background-color: #F5F5F5 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--cta-orange) !important;
    outline: none !important;
    background-color: #ffffff !important;
}

.select2-container--default .select2-results__option {
    padding: 12px 15px !important;
    font-family: 'Helvetica', sans-serif !important;
    font-size: 16px !important;
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #E3F5F5 !important;
    color: var(--cta-orange) !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--cta-orange) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option--selected {
    background-color: var(--cta-orange) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.select2-results__option:hover {
    background-color: #E3F5F5 !important;
    cursor: pointer !important;
}

/* Select2 width fix */
.select2-container {
    width: 100% !important;
}

/* Ensure disabled state matches */
.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
}

/* Radio and Checkbox Groups */
.radio-group {
    display: flex;
    gap: 30px;
}

.radio-label {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #555555;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.shipping-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.shipping-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #C2C2C2;
    border-radius: 15px;
    background-color: #F5F5F5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shipping-option:hover {
    border-color: var(--brand-teal);
    background-color: #ffffff;
}

.shipping-option input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.shipping-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--brand-teal);
}

/* Price Display */
.price-display,
.price-display.notranslate {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: 20px 25px;
    background-color: #E3F5F5;
    border: 2px solid var(--brand-teal);
    border-radius: 15px;
    margin-bottom: 25px;
}

.price-label {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    flex: 0 0 auto;
    width: auto !important;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-teal);
    flex: 0 0 auto;
    width: auto !important;
    text-align: right;
}

/* Medication Summary (Step 2) */
.medication-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: #E3F5F5;
    border: 2px solid var(--brand-teal);
    border-radius: 15px;
    margin-bottom: 25px;
    gap: 20px;
}

.medication-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.med-label {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.med-details {
    font-size: 16px;
    font-weight: 500;
    color: #555555;
}

.medication-price {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.price-label-inline {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.price-value-inline {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-teal);
}

/* Order Summary */
.order-summary {
    width: 100%;
    padding: 25px;
    background-color: #E3F5F5;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 2px solid #C2C2C2;
}

.order-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 20px;
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #D9B5AF;
    font-size: 16px;
}

.summary-row span:first-child {
    color: #555555;
    font-weight: 500;
}

.summary-row span:last-child {
    color: #000000;
    font-weight: 600;
    text-align: right;
}

.summary-row:last-of-type:not(.total) {
    border-bottom: 2px solid var(--brand-teal);
}

.summary-row.total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid var(--brand-teal);
    border-bottom: none;
    font-size: 20px;
    font-weight: 700;
}

.summary-row.total span:first-child {
    color: #000000;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: var(--brand-teal);
    font-size: 24px;
    font-weight: 700;
}

/* Consent Group */
.consent-group {
    width: 100%;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555555;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Buttons */
.btn-primary-red {
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    background-color: var(--cta-orange);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Helvetica', sans-serif;
}

.btn-primary-red:hover {
    background-color: #c04541;
}

.btn-primary-red:disabled {
    background-color: #C2C2C2;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 15px 30px;
    background-color: transparent;
    color: var(--brand-teal);
    border: 2px solid var(--brand-teal);
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Helvetica', sans-serif;
}

.btn-secondary:hover {
    background-color: var(--cta-orange);
    color: #ffffff;
}

.form-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: space-between;
}

.form-actions .btn-prev {
    flex: 1;
}

.form-actions .btn-next,
.form-actions .btn-primary-red {
    flex: 1;
}

.red-link {
    color: var(--brand-teal);
    text-decoration: none;
    font-weight: bold;
}

.red-link:hover {
    text-decoration: underline;
}
.support-image {
    background-color: #ddf9fc;
    padding: 15px;
    text-align: center;
    vertical-align: middle;
}

.support-image img {
    width: 75%;
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .page-section {
        padding: 40px 15px;
    }

    .form-wrapper {
        padding: 35px 40px;
        margin: 0 15px;
        border-radius: 20px;
        max-width: 100%;
    }

    .main-form {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .shipping-options {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        max-width: 100%;
        gap: 10px;
    }

    .step-label {
        font-size: 12px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .progress-steps::before {
        top: 17.5px;
    }
}

@media (max-width: 767.98px) {
    .page-section {
        padding: 30px 15px;
    }

    .form-wrapper {
        padding: 30px 20px;
        margin: 0 15px;
        border-radius: 15px;
    }

    .reorder-title {
        font-size: 22px;
    }

    .step-intro-text {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .form-control {
        font-size: 16px;
        padding: 12px 15px;
    }

    .btn-primary-red,
    .btn-secondary {
        font-size: 16px;
        padding: 13px 16px;
    }

    .price-display,
    .price-display.notranslate {
        padding: 15px 20px;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .price-label {
        font-size: 16px;
    }

    .price-value {
        font-size: 22px;
    }

    .medication-summary {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 15px;
    }

    .medication-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;
    }

    .medication-price {
        width: 100%;
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid #D9B5AF;
    }

    .order-summary {
        padding: 20px;
    }

    .order-summary h3 {
        font-size: 18px;
    }

    .summary-row {
        font-size: 14px;
    }

    .summary-row.total {
        font-size: 18px;
    }

    .summary-row.total span:last-child {
        font-size: 20px;
    }

    /* Keep progress steps in a single row */
    .progress-steps {
        gap: 8px;
        padding: 0 5px;
    }

    .progress-steps::before {
        top: 16px;
    }

    .step {
        flex: 1;
        min-width: 0;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 6px;
    }

    .step-label {
        font-size: 11px;
        line-height: 1.2;
        word-break: break-word;
    }
}

@media only screen and (max-width: 515px) {
    .form-wrapper {
        padding: 25px 15px;
        margin: 0 10px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .reorder-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .step-intro-text {
        font-size: 12px;
    }

    .btn-primary-red,
    .btn-secondary {
        font-size: 15px;
        padding: 12px 15px;
    }

    /* Compact single-row progress steps */
    .progress-steps {
        gap: 6px;
        margin-bottom: 30px;
        padding: 0 2px;
    }

    .progress-steps::before {
        top: 14px;
    }

    .step {
        flex: 1;
        min-width: 0;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-bottom: 5px;
    }

    .step-label {
        font-size: 10px;
        line-height: 1.1;
        word-break: break-word;
        max-width: 100%;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn-prev,
    .form-actions .btn-next,
    .form-actions .btn-primary-red {
        width: 100%;
    }

    .medication-summary {
        padding: 12px 15px;
        gap: 12px;
    }

    .med-label,
    .med-details,
    .price-label-inline {
        font-size: 14px;
    }

    .price-value-inline {
        font-size: 20px;
    }

    .price-display,
    .price-display.notranslate {
        padding: 12px 15px;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0;
    }

    .price-label {
        font-size: 14px;
    }

    .price-value {
        font-size: 22px;
    }

    .order-summary {
        padding: 15px;
    }

    .order-summary h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .summary-row {
        font-size: 13px;
        padding: 10px 0;
    }

    .summary-row.total {
        font-size: 16px;
    }

    .summary-row.total span:last-child {
        font-size: 18px;
    }

    .checkbox-label {
        font-size: 12px;
    }

    .shipping-option {
        padding: 12px;
        font-size: 14px;
    }
}
