/**
 * Supplier Quotation Submission Page Styles
 * Styles for the supplier quotation submission form page
 */

/* Override Elementor styles */
.supplier-quotation-submission-page {
    min-height: 100vh;
    background: #f5f6fa;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.supplier-quotation-submission-page *,
.supplier-quotation-submission-page *::before,
.supplier-quotation-submission-page *::after {
    box-sizing: border-box;
}

.supplier-quotation-submission-page .elementor-container,
.supplier-quotation-submission-page .elementor-row,
.supplier-quotation-submission-page .elementor-column,
.supplier-quotation-submission-page .elementor-section {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

/* ============================================
   BANNER HEADER
   ============================================ */
.supplier-quotation-banner {
    background: #108d52;
    width: 100%;
    padding: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
}

.banner-title {
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0;
    margin: 0;
    text-align: center;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.supplier-quotation-content {
    background: #f5f6fa;
    width: 100%;
    padding: 60px 0;
}

.content-container {
    padding: 0 20px;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
}

.supplier-quotation-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ============================================
   FORM CONTAINER
   ============================================ */
.supplier-quotation-form-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 45px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 16px;
    flex: 1;
}

.form-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.form-header-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.form-title {
    font-weight: 900;
    font-size: 18px;
    line-height: 27px;
    color: #108d52;
    margin: 0;
}

.form-description {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin: 0 0 10px 0;
    padding-top: 7px;
}

.form-description strong {
    font-weight: 700;
}

/* ============================================
   FORM
   ============================================ */
.supplier-quotation-form {
    width: 100%;
}

.form-row {
    margin-bottom: 10px;
}

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

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

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

.form-group {
    position: relative;
    width: 100%;
}

.form-label {
    display: block;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin-bottom: 8px;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #108d52;
    border-radius: 8px;
    font-weight: 400;
    font-size: 12px;
    line-height: normal;
    color: rgba(0, 0, 0, 0.87);
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 40px;
    font-family: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(0, 0, 0, 0.42);
    opacity: 1;
    font-size: 12px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #108d52;
    box-shadow: 0 0 0 3px rgba(16, 141, 82, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #f04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 124px;
    line-height: 17.25px;
}

/* ============================================
   FORM GROUP WITH ICON
   ============================================ */
.form-group-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group-with-icon .input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 14px;
    z-index: 1;
    pointer-events: none;
}

.form-group-with-icon .form-input {
    padding-right: 36px;
}

/* ============================================
   PRODUCTS TABLE
   ============================================ */
.products-table-wrapper {
    width: 100%;
    overflow: hidden;
}

.products-table-header {
    background: #f1f4f9;
    display: grid;
    grid-template-columns: 30px 1fr 78px 78px 78px 78px 75px;
    gap: 14px;
    padding: 12px 10px;
    border-radius: 8px;
}

.table-col {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    line-height: normal;
    color: #202224;
    text-align: center;
    align-items: start;
}

.table-col-number {
    justify-content: center;
}

.table-col-product {
    justify-content: flex-start;
}

.products-table-body {
    display: flex;
    flex-direction: column;
}

.product-row {
    display: grid;
    grid-template-columns: 30px 1fr 78px 78px 78px 78px 75px;
    gap: 14px;
    padding: 12px 10px;
    border-bottom: 1px solid #d1d0d0;
    align-items: center;
    position: relative;
}

/* Desktop only - remove border from last row */
@media (min-width: 769px) {
    .product-row:last-child {
        border-bottom: none;
    }
}

/* Mobile Product Header */
.product-mobile-header {
    display: none;
}

.product-mobile-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #202224;
    margin: 0;
}

.mobile-label {
    display: none;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin-bottom: 8px;
}

.btn-delete-row-mobile {
    display: none;
}

.table-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #108d52;
    border-radius: 8px;
    font-size: 12px;
    min-height: 37px;
    box-sizing: border-box;
}

.table-input:focus {
    outline: none;
    border-color: #108d52;
    box-shadow: 0 0 0 3px rgba(16, 141, 82, 0.1);
}

.table-input[readonly] {
    background: #f9fafb;
    cursor: not-allowed;
}

.products-table-footer {
    padding: 12px 10px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #d1d0d0;
}

.btn-add-row {
    background: #a3ce4d;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    line-height: normal;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 37px;
}

.btn-add-row:hover {
    background: #8fb83d;
}

.btn-add-row svg {
    width: 14px;
    height: 14px;
}

.btn-delete-row {
    background: #ed3934;
    border: none;
    border-radius: 8px;
    padding: 7px 17px;
    font-weight: 700;
    font-size: 14px;
    line-height: normal;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 75px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-row:hover {
    background: #d32f2a;
}

.products-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 10px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
}

.summary-item {
    white-space: nowrap;
}

.summary-item strong {
    font-weight: 700;
}

.summary-total {
    color: #ed3934;
    font-weight: 700;
}

.summary-total strong {
    font-weight: 700;
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.upload-area {
    border: 2px dashed #d5d5d5;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #108d52;
    background: rgba(16, 141, 82, 0.05);
}

.upload-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.upload-text {
    flex: 1;
}

.upload-text p {
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #667085;
    margin: 0;
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.form-actions {
    margin-top: 8px;
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.btn-submit {
    background: #008934;
    border: none;
    border-radius: 8px;
    padding: 6px 13px 7.5px;
    font-weight: 500;
    font-size: 14px;
    line-height: 24.5px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 64px;
}

.btn-submit:hover {
    background: #007529;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 137, 52, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.supplier-quotation-sidebar {
    width: 30%;
}

.sidebar-content {
    border: 1px solid #a3ce4d;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
    position: sticky;
    top: 0;
}

.sidebar-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 7px;
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #108d52;
    margin: 0;
}

.sidebar-description {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin: 0 0 16px 0;
}

.sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.step-number {
    background: #eeeeee;
    border-radius: 10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #1d2939;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.step-title {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #344054;
    margin: 0;
}

.step-description {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #475467;
    margin: 0;
}

/* ============================================
   FORM MESSAGES
   ============================================ */
.form-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    animation: slideDown 0.3s ease;
}

.form-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1400px) {
    .supplier-quotation-wrapper {
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .supplier-quotation-wrapper {
        flex-direction: column;
        gap: 24px;
    }
    
    .supplier-quotation-form-container {
        flex: 1;
        width: 100%;
    }
    
    .supplier-quotation-sidebar {
        flex: 1;
        width: 100%;
    }
    
    .sidebar-content {
        position: relative;
    }
}

@media (max-width: 992px) {
    .banner-title {
        font-size: 36px;
    }
    
    .supplier-quotation-wrapper {
        gap: 20px;
    }
    
    .form-row-2col {
        gap: 16px;
    }
    
    .form-row-4col {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .products-table-header,
    .product-row {
        grid-template-columns: 30px 1fr 60px 60px 60px 60px 60px;
        gap: 8px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .supplier-quotation-banner {
        height: 180px;
        padding: 0 20px;
    }
    
    .banner-title {
        font-size: 28px;
        line-height: 32px;
    }
    
    .supplier-quotation-content {
        padding: 30px 0;
    }
    
    .content-container {
        padding: 0 16px;
    }
    
    .supplier-quotation-wrapper {
        gap: 20px;
    }
    
    .supplier-quotation-form-container {
        padding: 16px;
    }
    
    .supplier-quotation-sidebar {
        width: 100%;
    }
    
    .sidebar-content {
        padding: 14px;
    }
    
    .form-row-2col {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .form-row-4col {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    /* Products Table Mobile */
    .products-table-header {
        display: none;
    }
    
    .product-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        border: 1px solid #d1d0d0;
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 16px;
        background: #ffffff;
    }
    
    .product-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid #d1d0d0;
        grid-column: 1 / -1;
    }
    
    .btn-delete-row-mobile {
        display: flex;
        background: #ed3934;
        border: none;
        border-radius: 8px;
        padding: 6px 12px;
        font-weight: 700;
        font-size: 12px;
        line-height: normal;
        color: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
        align-items: center;
        justify-content: center;
        min-width: 60px;
        height: 32px;
    }
    
    .btn-delete-row-mobile:hover {
        background: #d32f2a;
    }
    
    .table-col {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .table-col-number {
        display: none;
    }
    
    .table-col-product {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }
    
    /* Group Quantity and Unit Price in 2 columns */
    .table-col-quantity {
        grid-column: 1;
    }
    
    .table-col-price {
        grid-column: 2;
    }
    
    /* Group Discount and Total in 2 columns */
    .table-col-discount {
        grid-column: 1;
    }
    
    .table-col-total {
        grid-column: 2;
    }
    
    .table-col-action {
        display: none;
    }
    
    .mobile-label {
        display: block;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 24px;
        line-height: 28px;
    }

    .content-container {
        padding: 0 10px;
    }

    .supplier-quotation-content {
        padding: 20px 0;
    }
    
    .supplier-quotation-form-container {
        padding: 12px;
    }
    
    .form-row-2col {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .form-row-4col {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .form-title {
        font-size: 16px;
    }
    
    .form-description {
        font-size: 12px;
    }
    
    .sidebar-content {
        padding: 12px;
    }
    
    .sidebar-title {
        font-size: 14px;
    }
    
    .sidebar-description {
        font-size: 12px;
    }
}

