/**
 * Bulk RFQ Upload - Public Styles
 *
 * @package Bulk_RFQ_Upload
 */

/* ========================================
   Container & Layout
   ======================================== */
.bulk-rfq-upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bulk-rfq-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border: 1px solid #e5e7eb;
}

.bulk-rfq-title {
    margin: 0 0 10px;
    font-size: 1.75em;
    font-weight: 700;
    color: #1e3a5f;
    text-align: center;
}

.bulk-rfq-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1.05em;
}

/* ========================================
   Form Fields
   ======================================== */
.bulk-rfq-field {
    margin-bottom: 24px;
}

.bulk-rfq-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
}

.bulk-rfq-field input[type="text"],
.bulk-rfq-field input[type="email"],
.bulk-rfq-field input[type="tel"],
.bulk-rfq-field input[type="number"],
.bulk-rfq-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.bulk-rfq-field input:focus,
.bulk-rfq-field textarea:focus {
    border-color: #1e3a5f;
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
    background: #fff;
}

.bulk-rfq-field .required {
    color: #ef4444;
    margin-left: 2px;
}

/* ========================================
   Dropzone
   ======================================== */
.bulk-rfq-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
}

.bulk-rfq-dropzone:hover,
.bulk-rfq-dropzone.bulk-rfq-dropzone-active {
    border-color: #1e3a5f;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.12);
}

.bulk-rfq-dropzone-content {
    pointer-events: none;
}

.bulk-rfq-dropzone-content > * {
    pointer-events: auto;
}

.bulk-rfq-upload-icon {
    width: 64px;
    height: 64px;
    color: #9ca3af;
    margin: 0 auto 16px;
    display: block;
    transition: color 0.2s;
}

.bulk-rfq-dropzone:hover .bulk-rfq-upload-icon {
    color: #1e3a5f;
}

.bulk-rfq-dropzone-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
}

.bulk-rfq-dropzone-or {
    color: #9ca3af;
    margin: 12px 0;
    font-size: 14px;
}

.bulk-rfq-browse-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff !important;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    border: none;
}

.bulk-rfq-browse-btn:hover {
    background: linear-gradient(135deg, #152a45 0%, #1e4070 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* File Selected State */
.bulk-rfq-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 8px;
    margin-top: -20px;
    margin-bottom: 20px;
}

.bulk-rfq-file-name {
    font-weight: 600;
    color: #059669;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-rfq-file-name::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-size: 12px;
}

.bulk-rfq-remove-file {
    background: none;
    border: none;
    font-size: 22px;
    color: #6b7280;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s;
}

.bulk-rfq-remove-file:hover {
    color: #ef4444;
}

/* File Type Info */
.bulk-rfq-file-types {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.6;
}

/* ========================================
   Submit Button
   ======================================== */
.bulk-rfq-submit-btn,
.bulk-rfq-submit-quote-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-rfq-submit-btn:hover:not(:disabled),
.bulk-rfq-submit-quote-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #152a45 0%, #1e4070 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.35);
}

.bulk-rfq-submit-btn:disabled,
.bulk-rfq-submit-quote-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   Progress Indicator
   ======================================== */
.bulk-rfq-progress {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
}

.bulk-rfq-progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.bulk-rfq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3a5f 0%, #4fd1c5 100%);
    width: 0;
    transition: width 0.5s ease;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

/* Animated shine effect on progress bar */
.bulk-rfq-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.bulk-rfq-progress-text {
    margin-top: 12px;
    text-align: center;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   Error Message
   ======================================== */
.bulk-rfq-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-rfq-error::before {
    content: "⚠";
    font-size: 18px;
}

/* ========================================
   Review Section
   ======================================== */
.bulk-rfq-review-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.bulk-rfq-review-title {
    margin: 0 0 8px;
    font-size: 1.5em;
    font-weight: 700;
    color: #1e3a5f;
}

.bulk-rfq-review-subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 15px;
}

#bulk-rfq-item-count {
    font-weight: 700;
    color: #1e3a5f;
    font-size: 1.2em;
}

/* ========================================
   Items Table
   ======================================== */
.bulk-rfq-items-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bulk-rfq-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.bulk-rfq-items-table th {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: #fff;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-rfq-items-table th:first-child {
    border-radius: 10px 0 0 0;
}

.bulk-rfq-items-table th:last-child {
    border-radius: 0 10px 0 0;
}

.bulk-rfq-items-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #374151;
}

.bulk-rfq-items-table tbody tr:hover {
    background: #f9fafb;
}

.bulk-rfq-items-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 10px;
}

.bulk-rfq-items-table tbody tr:last-child td:last-child {
    border-radius: 0 0 10px 0;
}

.bulk-rfq-item-row.bulk-rfq-editing {
    background: #fffbeb !important;
}

.bulk-rfq-item-row.bulk-rfq-low-confidence {
    background: #fef3c7;
}

.bulk-rfq-item-row.bulk-rfq-low-confidence td:first-child::before {
    content: "⚠️";
    margin-right: 6px;
}

.bulk-rfq-col-qty {
    width: 80px;
    text-align: right;
}

.bulk-rfq-col-unit {
    width: 80px;
}

.bulk-rfq-col-actions {
    width: 100px;
    text-align: center;
}

.bulk-rfq-edit-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.bulk-rfq-edit-input:focus {
    border-color: #1e3a5f;
    outline: none;
}

.bulk-rfq-cell-qty .bulk-rfq-edit-input {
    width: 70px;
    text-align: right;
}

/* Action Buttons */
.bulk-rfq-edit-item,
.bulk-rfq-save-item,
.bulk-rfq-cancel-edit,
.bulk-rfq-remove-item {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 16px;
    opacity: 0.6;
    transition: all 0.2s;
    border-radius: 4px;
}

.bulk-rfq-edit-item:hover {
    opacity: 1;
    background: #eff6ff;
    color: #1e3a5f;
}

.bulk-rfq-save-item:hover {
    opacity: 1;
    background: #ecfdf5;
    color: #059669;
}

.bulk-rfq-cancel-edit:hover {
    opacity: 1;
    background: #fef2f2;
    color: #dc2626;
}

.bulk-rfq-remove-item:hover {
    opacity: 1;
    background: #fef2f2;
    color: #dc2626;
}

/* ========================================
   Add Item Section
   ======================================== */
.bulk-rfq-add-item {
    margin-bottom: 30px;
}

.bulk-rfq-add-item-btn {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px dashed #d1d5db;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-rfq-add-item-btn:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #1e3a5f;
    color: #1e3a5f;
}

.bulk-rfq-add-item-form {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 20px;
    border-radius: 10px;
    margin-top: 12px;
    border: 1px solid #e5e7eb;
}

.bulk-rfq-add-item-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.bulk-rfq-add-item-row input[type="text"] {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.bulk-rfq-add-item-row input[type="number"] {
    width: 90px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.bulk-rfq-add-item-row input:focus {
    border-color: #1e3a5f;
    outline: none;
}

.bulk-rfq-add-item-confirm,
.bulk-rfq-add-item-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.bulk-rfq-add-item-confirm {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
}

.bulk-rfq-add-item-confirm:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
}

.bulk-rfq-add-item-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.bulk-rfq-add-item-cancel:hover {
    background: #e5e7eb;
}

/* ========================================
   Customer Details
   ======================================== */
.bulk-rfq-customer-details {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.bulk-rfq-customer-details h4 {
    margin: 0 0 20px;
    color: #1e3a5f;
    font-size: 1.1em;
    font-weight: 600;
}

.bulk-rfq-customer-fields {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.bulk-rfq-customer-fields.bulk-rfq-two-col {
    grid-template-columns: 1fr 1fr;
}

.bulk-rfq-customer-fields.bulk-rfq-three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Select dropdown styling */
.bulk-rfq-field select,
.bulk-rfq-country-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #f9fafb;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.bulk-rfq-field select:focus,
.bulk-rfq-country-select:focus {
    border-color: #1e3a5f;
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
    background-color: #fff;
}

/* Customer details inner field margins */
.bulk-rfq-customer-details .bulk-rfq-field {
    margin-bottom: 16px;
}

.bulk-rfq-customer-details .bulk-rfq-customer-fields .bulk-rfq-field {
    margin-bottom: 0;
}

/* Last fields before notes shouldn't have bottom margin */
.bulk-rfq-customer-details > .bulk-rfq-field:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .bulk-rfq-customer-fields.bulk-rfq-two-col,
    .bulk-rfq-customer-fields.bulk-rfq-three-col {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    .bulk-rfq-customer-fields.bulk-rfq-three-col {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========================================
   Submit Section
   ======================================== */
.bulk-rfq-submit-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.bulk-rfq-back-btn {
    background: #fff;
    border: 2px solid #e5e7eb;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-rfq-back-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.bulk-rfq-submit-section .bulk-rfq-submit-quote-btn {
    flex: 1;
    max-width: 280px;
}

/* ========================================
   Success Message
   ======================================== */
.bulk-rfq-success {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
}

.bulk-rfq-success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 40px;
}

.bulk-rfq-success h3 {
    margin: 0 0 12px;
    color: #059669;
    font-size: 1.75em;
    font-weight: 700;
}

.bulk-rfq-success p {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.bulk-rfq-new-request {
    background: #fff;
    border: 2px solid #10b981;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #059669;
    font-size: 15px;
    transition: all 0.2s;
}

.bulk-rfq-new-request:hover {
    background: #10b981;
    color: #fff;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .bulk-rfq-upload-container {
        padding: 20px 15px;
    }

    .bulk-rfq-form {
        padding: 24px 20px;
    }

    .bulk-rfq-title {
        font-size: 1.4em;
    }

    .bulk-rfq-dropzone {
        padding: 35px 20px;
    }

    .bulk-rfq-items-table {
        font-size: 13px;
    }

    .bulk-rfq-items-table th,
    .bulk-rfq-items-table td {
        padding: 10px 8px;
    }

    .bulk-rfq-submit-section {
        flex-direction: column;
    }

    .bulk-rfq-back-btn {
        width: 100%;
        justify-content: center;
    }

    .bulk-rfq-submit-section .bulk-rfq-submit-quote-btn {
        max-width: none;
        width: 100%;
    }
}

/* ========================================
   Loading Spinner
   ======================================== */
.bulk-rfq-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.bulk-rfq-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: bulk-rfq-spin 0.8s linear infinite;
}

@keyframes bulk-rfq-spin {
    to {
        transform: rotate(360deg);
    }
}

.bulk-rfq-loading-text {
    margin-top: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* ========================================
   Feature Badges
   ======================================== */
.bulk-rfq-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.bulk-rfq-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.bulk-rfq-feature svg {
    width: 18px;
    height: 18px;
    color: #10b981;
}
