/**
 * Flatsome Team Bulk Order CSS
 * Brand Colors: #0b2545 (Navy), #fe6500 (Orange), #10b981 (Success Green)
 */

.team-order-wrapper {
    /* max-width: 1240px; */
    margin: 20px auto !important;
    padding: 0px;
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    color: #1e293b;
}

/* HERO SECTION */
.team-order-hero {
    background: linear-gradient(135deg, #0b2545 0%, #173b67 100%);
    border-radius: 12px;
    padding: 36px 24px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(11, 37, 69, 0.15);
}

.team-hero-badge {
    display: inline-block;
    background: rgba(254, 101, 0, 0.95);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.team-hero-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.team-hero-subtitle {
    font-size: 14px;
    color: #cbd5e1;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.5;
}

/* STEP CARDS */
.team-step-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.team-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.team-step-badge {
    background: #0b2545;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.team-step-title-wrap {
    flex: 1;
    min-width: 220px;
}

.team-step-title {
    font-size: 18px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 0 4px 0;
}

.team-step-desc {
    font-size: 13px;
    color: #64748b;
    display: block;
}

/* TOTAL COUNTER BOX */
.team-total-counter-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.counter-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.counter-number {
    font-size: 24px;
    font-weight: 800;
    color: #fe6500;
    line-height: 1;
}

.counter-unit {
    font-size: 13px;
    color: #64748b;
}

/* BƯỚC 1: SIZE GRID (3 size ở trên, 3 size ở dưới) */
.team-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 991px) {
    .team-size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .team-size-grid {
        grid-template-columns: 1fr;
    }
}

.team-size-item {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.team-size-item:hover {
    border-color: #cbd5e1;
}

.team-size-item.has-qty {
    background: #fffaf5;
    border-color: #fe6500;
    box-shadow: 0 2px 8px rgba(254, 101, 0, 0.12);
}

.team-size-name {
    font-size: 15px;
    font-weight: 700;
    color: #0b2545;
    margin: 0;
}

.team-size-stepper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.team-step-btn {
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #0b2545;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    padding: 0;
}

.team-step-btn:hover {
    background: #e2e8f0;
    color: #fe6500;
}

.team-size-input {
    width: 44px;
    height: 32px;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 !important;
    padding: 0 !important;
    outline: none;
    box-shadow: none !important;
    background: #ffffff;
    -moz-appearance: textfield;
}

.team-size-input::-webkit-outer-spin-button,
.team-size-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* STEP 1 ACTION BUTTONS */
.team-step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.team-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.team-btn-primary {
    background: #fe6500;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(254, 101, 0, 0.25);
}

.team-btn-primary:hover {
    background: #e55a00;
    box-shadow: 0 6px 16px rgba(254, 101, 0, 0.35);
    transform: translateY(-1px);
}

.team-btn-outline {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.team-btn-outline:hover {
    background: #f8fafc;
    color: #0b2545;
    border-color: #94a3b8;
}

/* BƯỚC 2: FILTER BAR */
.team-filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.team-filter-search { flex: 1 1 240px; min-width: 220px; } .team-search-input { background: #ffffff; border: 1px solid #e2e8f0 !important; border-radius: 4px !important; padding: 6px 12px; font-size: 13px; color: #1e293b; outline: none; min-width: 220px; width: 100%; height: 38px; margin: 0 !important; box-shadow: none !important; } .team-search-input:focus { border-color: #0b2545; box-shadow: 0 0 0 2px rgba(11, 37, 69, 0.12) !important; } .team-filter-bar > .team-filter-group:has(#team-filter-color) { display: none !important; } .team-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin: 0;
    white-space: nowrap;
}

.team-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 30px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    min-width: 150px;
    margin: 0 !important;
    height: 38px;
}

.team-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    cursor: pointer;
}

.team-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    margin: 0;
}

.team-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.team-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 22px;
}

.team-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.team-switch input:checked + .team-slider {
    background-color: #10b981;
}

.team-switch input:checked + .team-slider:before {
    transform: translateX(16px);
}

.team-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #0b2545;
}

/* PRODUCTS GRID */
.team-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

/* PRODUCT CARD */
.team-prod-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s ease;
}

.team-prod-card:hover {
    box-shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.team-prod-card.is-full-match {
    border-color: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

/* CARD BADGES */
.team-card-badge-wrap {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.team-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.badge-full-match {
    background: #10b981;
    color: #ffffff;
}

.badge-missing {
    background: #f59e0b;
    color: #ffffff;
}

/* CARD THUMB */
.team-card-thumb {
    width: 100%;
    height: 240px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
}

.team-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-prod-card:hover .team-card-thumb img {
    transform: scale(1.04);
}

/* CARD INFO */
.team-card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.team-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 0 6px 0;
    line-height: 1.35;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.team-card-price {
    font-size: 16px;
    font-weight: 800;
    color: #fe6500;
    margin-bottom: 12px;
}

/* MATRIX TABLE (2 DÒNG) */
.team-card-matrix {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 0 !important;
}

.matrix-table th {
    background: #0b2545;
    color: #ffffff;
    font-weight: 700;
    padding: 5px 2px;
    text-align: center;
    border-right: 1px solid #173b67;
    font-size: 11px;
}

.matrix-table th:last-child {
    border-right: none;
}

.matrix-table td {
    padding: 5px 2px;
    text-align: center;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
}

.matrix-table td:last-child {
    border-right: none;
}

.row-stock td {
    background: #ffffff;
    color: #0b2545;
}

.row-demand td {
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

.row-demand td.need-met {
    background: #ecfdf5;
    color: #059669;
}

.row-demand td.need-short {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
}

.row-demand td.need-zero {
    color: #cbd5e1;
}

/* STOCK NOTE */
.team-card-stock-note {
    font-size: 12px;
    line-height: 1.4;
    min-height: 34px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.note-success {
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-warning {
    color: #d97706;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-neutral {
    color: #94a3b8;
    font-style: italic;
}

/* CARD BUTTON */
.team-card-action {
    margin-top: auto;
}

.team-btn-choose-qty {
    width: 100%;
    background: #0b2545;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.team-btn-choose-qty:hover {
    background: #fe6500;
    color: #ffffff;
}

/* LOADING PLACEHOLDER */
.team-loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.team-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #fe6500;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    animation: team-spin 0.8s linear infinite;
}

@keyframes team-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.team-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

/* ==========================================================================
   MODAL POPUP STYLES
   ========================================================================== */
.team-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 37, 69, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    animation: team-fade-in 0.2s ease-out;
}

@keyframes team-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.team-modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: team-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes team-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.team-modal-header {
    background: #0b2545;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.team-modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    transition: opacity 0.15s;
}

.team-modal-close:hover {
    opacity: 1;
}

.team-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* MODAL PRODUCT BAR */
.team-modal-product-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.team-modal-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.team-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-modal-prod-name {
    font-size: 15px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 0 4px 0;
}

.team-modal-price {
    font-size: 15px;
    font-weight: 800;
    color: #fe6500;
}

/* 1-CLICK FAST FILL BOX */
.team-modal-fast-fill-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.fast-fill-info {
    font-size: 13px;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-btn-fast-fill {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}

.team-btn-fast-fill:hover {
    background: #059669;
}

.team-fast-fill-notice {
    background: #f8fafc;
    border-left: 3px solid #10b981;
    padding: 8px 12px;
    font-size: 12px;
    color: #334155;
    margin-bottom: 14px;
}

/* MODAL TABLE */
.team-modal-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.team-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0 !important;
}

.team-modal-table th {
    background: #0b2545;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid #173b67;
}

.team-modal-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
}

.team-modal-table tr:last-child td {
    border-bottom: none;
}

.team-modal-table .size-label-cell {
    font-weight: 700;
    color: #0b2545;
}

.team-modal-table .stock-cell.out-of-stock {
    color: #dc2626;
    font-weight: 600;
}

.team-modal-table .modal-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.modal-step-btn {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #0b2545;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-step-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: #fe6500;
}

.modal-step-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.modal-qty-input {
    width: 44px;
    height: 28px;
    border: none !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0b2545;
    margin: 0 !important;
    padding: 0 !important;
    outline: none;
    box-shadow: none !important;
}

/* MODAL FOOTER */
.team-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.team-modal-summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.sum-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.sum-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: #fe6500;
}

.sum-total-qty {
    font-size: 13px;
    color: #64748b;
}

.team-modal-footer-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TOAST NOTIFICATION */
.team-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0b2545;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    z-index: 10000000;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #10b981;
    animation: team-toast-in 0.3s ease-out;
}

@keyframes team-toast-in {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .team-hero-title {
        font-size: 20px;
    }
    .team-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .team-filter-group, .team-filter-toggle {
        width: 100%;
        margin-left: 0;
    }
    .team-select {
        flex: 1;
    }
    .team-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }
    .team-modal-dialog {
        max-height: 95vh;
    }
}
