/* SF Pro Display Font Faces */
@font-face {
    font-family: 'SF Pro Display';
    src: url('assets/fonts/SFProDisplay-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('assets/fonts/SFProDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('assets/fonts/SFProDisplay-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('assets/fonts/SFProDisplay-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('assets/fonts/SFProDisplay-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #F5F5F5;
    color: #2F2F2F;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: #fff;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    width: 65px;
    height: auto;
}

/* Main Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 100px);
}

/* Card */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    min-height: 735px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 133px;
}

.card.step3-active {
    min-height: 400px;
}

/* Step 3: keep in-flow content above the absolutely positioned footer bar */
#step3.section.active {
    padding-bottom: 120px;
}

.download-orders-container {
    padding: 0 80px;
    text-align: center;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Step 1 initial state - white bg with border, green text */
.step.active-bordered {
    background-color: #fff;
    color: #5C8727;
    border: 2px solid #DADADA;
}

/* Step completed or Step 2 active - solid green fill */
.step.active {
    background-color: #5C8727;
    color: #fff;
    border: none;
}

/* Inactive step - white bg with border, gray text */
.step.inactive {
    background-color: #fff;
    color: #DADADA;
    border: 2px solid #DADADA;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #DADADA 0,
        #DADADA 5px,
        transparent 5px,
        transparent 10px
    );
}

/* Headings */
h1 {
    font-size: 24px;
    font-weight: 500;
    color: #2F2F2F;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 20px;
    font-weight: 500;
    color: #2F2F2F;
    margin-bottom: 10px;
}

/* Instructions */
.instructions {
    color: #2F2F2F;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 25.6px; /* 160% */
    font-feature-settings: 'liga' off, 'clig' off;
    margin-bottom: 30px;
}
.upload-instructions{
    color: #5C8727;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 25.6px; /* 160% */
    font-feature-settings: 'liga' off, 'clig' off;
    margin-bottom: 30px;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #2F2F2F;
    margin-bottom: 8px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    color: #2F2F2F;
    background: transparent;
    border: none;
    border-bottom: 1px solid #EBEBEB;
    outline: none;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-bottom-color: #5C8727;
}

input::placeholder {
    color: #DADADA;
}

/* Error state for inputs */
input.error {
    border-bottom-color: #BD0015;
}

/* Error Messages */
.error-message {
    color: #BD0015;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.form-error {
    display: none;
    padding: 0px 80px;
}

.form-error.show {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-error-icon {
    color: #BD0015;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: -2px;
}

.form-error-text {
    color: #BD0015;
    font-size: 13px;
    line-height: 1.5;
}

/* Download Link */
.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5C8727;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.download-link:hover {
    opacity: 0.8;
}

.download-icon {
    font-size: 16px;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #DADADA;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #5C8727;
    background-color: #F9FBF7;
}

.file-upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    display: block;
}

.file-upload-area.drag-over .file-upload-icon {
    opacity: 0.8;
}

input[type="file"] {
    display: none;
}

/* File Display */
.file-display {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    margin-bottom: 20px;
}

.file-display.show {
    display: flex;
}

.file-icon {
    font-size: 24px;
    color: #5C8727;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    color: #2F2F2F;
    font-weight: 500;
}

.file-size {
    font-size: 12px;
    color: #58585B;
}

.file-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-delete svg {
    width: 18px;
    height: 18px;
}

.file-delete:hover {
    opacity: 0.7;
}

/* Loading Bar */
.file-loading {
    display: none;
    padding: 20px 0;
    margin-bottom: 20px;
}

.file-loading.show {
    display: block;
}

.file-loading-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.file-loading-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.file-loading-text {
    font-size: 14px;
    color: #2F2F2F;
    font-weight: 500;
}

.file-loading-bar-container {
    width: 100%;
    height: 8px;
    background-color: #EBEBEB;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.file-loading-bar-fill {
    height: 100%;
    background-color: #5C8727;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.file-loading-percentage {
    font-size: 12px;
    color: #58585B;
    margin-top: 8px;
    text-align: right;
}

/* Success Section */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #5C8727;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #5C8727;
    stroke-width: 3;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #CF4520;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-icon svg {
    width: 40px;
    height: 40px;
    stroke: #CF4520;
    stroke-width: 3;
}

/* display:flex above overrides the UA [hidden] rule — keep hidden icons off-screen */
.success-icon[hidden],
.error-icon[hidden] {
    display: none !important;
}

.success-message {
    text-align: center;
    margin-bottom: 30px;
}

.success-message p {
    color: #58585B;
    font-size: 14px;
    margin-top: 10px;
}

/* Step 3: import banner + order transactions table */
.import-result-banner {
    display: none;
    margin: 0 80px 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.import-result-banner.show {
    display: block;
}

.import-result-banner.import-banner-error {
    background-color: #FDECEA;
    color: #8B2E24;
    border: 1px solid #E8B4AE;
}

.import-result-banner.import-banner-ok {
    background-color: #EEF6E5;
    color: #3D5C1F;
    border: 1px solid #C5D9A8;
}

.import-error-list {
    margin: 8px 0 0 1.1em;
    padding: 0;
}

.order-transactions-host {
    margin: 0 80px 24px;
    overflow-x: auto;
}

.order-table-empty {
    color: #58585B;
    font-size: 14px;
    margin: 0;
}

.order-transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.order-transactions-table th,
.order-transactions-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #EBEBEB;
}

.order-transactions-table th {
    font-weight: 600;
    color: #2F2F2F;
    background-color: #F5F5F5;
}

.order-transactions-table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.submit-button {
    max-width: 200px;
    width: 100%;
    height: 32px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: #DADADA;
    border: none;
    border-radius: 25px;
    cursor: not-allowed;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

.submit-button:enabled {
    background-color: #5C8727;
    cursor: pointer;
}

.submit-button:enabled:hover {
    background-color: #4A6D1F;
}

/* Section Visibility */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 767px) {
    .header {
        padding: 15px 20px;
    }

    .logo {
        width: 100px;
    }

    .container {
        padding: 20px 15px;
    }

    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 20px;
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-connector {
        width: 30px;
    }

    .file-upload-area {
        padding: 40px 15px;
    }
}

.button-container {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 40px 80px;
    border-top: 1px solid #EBEBEB;
    border-radius: 0 0 8px 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
}

.section.active{
    padding-top: 70px;
}

.form-group, .instructions, .download-template-container{
    padding: 0 80px;
}

.upload-instructions{
    padding: 0 30px;
}

.file-delete{
    height: 24px;
    width: 24px;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .card {
        max-width: 550px;
    }
}
