/* =========================================================
   client-new-order.css — styles for /client/order page
   Trang đặt hàng dùng Alpine select (.alpine-select).
   ========================================================= */

/* ── Modal visibility ──────────────────────────────────── */
.modal:not(.show):not(.showing) {
    display: none !important;
}

.modal.show,
.modal.showing {
    display: block !important;
}

#orderProcessingModal {
    z-index: 1060 !important;
}

#orderProcessingModal.show~.modal-backdrop {
    z-index: 1059 !important;
}

/* Nền overlay nhạt, không đen khi modal "Đang xử lý đơn" hiện (trang order) */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

/* ── Alpine.js Searchable Select — nền trắng, viền xám ── */
[x-cloak] {
    display: none !important;
}

.alpine-select {
    position: relative;
}

.alpine-select-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    color: #212529;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.alpine-select-trigger-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.alpine-select-trigger-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.alpine-select-trigger-row .alpine-select-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alpine-select-trigger-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.alpine-select-trigger-meta .alpine-select-badge {
    font-size: 0.68rem;
    padding: 0.16rem 0.4rem;
}

.alpine-select-trigger-meta .alpine-select-tags-inline,
.alpine-select-item-meta .alpine-select-tags-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.alpine-select-tags-inline .service-tags-wrap {
    margin: 0;
    display: inline-flex;
}

.alpine-select-tags-inline .service-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
}

.alpine-select-toggle:hover {
    border-color: #adb5bd;
    background: #fafafa;
}

.alpine-select-toggle:active {
    transform: scale(0.99);
}

.alpine-select-toggle:focus {
    outline: none;
    border-color: var(--pc-primary, #4680ff);
    box-shadow: 0 0 0 2px rgba(70, 128, 255, 0.2);
}

.alpine-select-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.alpine-select-toggle:disabled:active {
    transform: none;
}

.alpine-select-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    background: transparent;
}

.alpine-select-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: inherit;
}

.alpine-select-arrow {
    flex-shrink: 0;
    color: #6c757d;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

/* Chevron xoay 180° khi dropdown mở (đóng: xuống, mở: lên) */
.alpine-select-open .alpine-select-arrow {
    transform: rotate(180deg);
    color: var(--pc-primary, #4680ff);
}

.alpine-select--loading .alpine-select-toggle {
    pointer-events: none;
}

.alpine-select-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.875rem;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #dee2e6;
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: 500;
}

.alpine-select-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top-color: var(--pc-primary, #4680ff);
    border-radius: 50%;
    animation: alpineSelectSpin 0.7s linear infinite;
}

@keyframes alpineSelectSpin {
    to {
        transform: rotate(360deg);
    }
}

.alpine-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin-top: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: alpineSelectMenuIn 0.2s ease;
}

@keyframes alpineSelectMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alpine-select-search {
    padding: 6px 8px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.alpine-select-search input {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
    color: #212529;
}

.alpine-select-search input::placeholder {
    color: #adb5bd;
}

.alpine-select-search input:focus {
    outline: none;
    border-color: var(--pc-primary, #4680ff);
    box-shadow: 0 0 0 2px rgba(70, 128, 255, 0.15);
}

.alpine-select-options {
    overflow-y: auto;
    padding: 4px 6px;
    max-height: 240px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.alpine-select-options::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Mặc định: icon và chữ cùng hàng (Nền tảng, Phân loại) */
.alpine-select-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    transition: background 0.15s;
}

/* Có .alpine-select-item-row + meta: xếp dọc (Tìm dịch vụ nhanh, Chọn dịch vụ) */
.alpine-select-item:has(.alpine-select-item-row) {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

.alpine-select-item:hover {
    background: #f8f9fa;
}

/* Hàng 1: icon + badge ID + VN + tên + badge giá */
.alpine-select-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alpine-select-item .alpine-select-icon {
    width: 24px;
    height: 24px;
}

.alpine-select-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hàng 2: badge Hủy + Bảo hành (đưa ra ngoài, to, nét) */
.alpine-select-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Badge: nhỏ gọn, màu phẳng tinh tế (không gradient tộc) ── */
.alpine-select-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

.alpine-select-badge i {
    font-size: 0.85em;
    line-height: 1;
    opacity: 0.88;
}

/* Badge ID — xanh nhạt phẳng */
.alpine-select-badge-id {
    color: #1d4ed8;
    background: #eff6ff;
}

.alpine-select-badge-id i {
    color: #2563eb;
}

/* Badge VN */
.alpine-select-badge-vn {
    font-size: 0.68rem;
    padding: 0.16rem 0.35rem;
    color: #4338ca;
    background: #e0e7ff;
}

/* Nhóm badge trên trigger (Hủy + BH + giá) */
.alpine-select-trigger-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.alpine-select-trigger-badges .alpine-select-badge {
    font-size: 0.68rem;
    padding: 0.16rem 0.4rem;
}

/* Badge giá — icon coin (ti-coin) + gradient nhẹ (teal) */
.alpine-select-badge-price {
    color: #047857;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(5, 150, 105, 0.2);
}

.alpine-select-badge-price i {
    color: #059669;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
}

.alpine-select-badge-price .ti-coin {
    color: #047857;
}

/* Badge trên trigger (khi đã chọn) */
.alpine-select-trigger-badge {
    flex-shrink: 0;
    margin-left: auto;
}

.alpine-select-toggle .alpine-select-trigger-badge {
    font-size: 0.7rem;
    padding: 0.18rem 0.45rem;
}

/* Badge Hủy — đỏ nhạt phẳng */
.alpine-select-badge-cancel {
    color: #b91c1c;
    background: #fef2f2;
}

.alpine-select-badge-cancel i {
    color: #dc2626;
}

/* Badge Bảo hành — xanh lá nhạt phẳng */
.alpine-select-badge-warranty {
    color: #166534;
    background: #f0fdf4;
}

.alpine-select-badge-warranty i {
    color: #16a34a;
}

/* ── Ô Số lượng: ẩn spinner và scroll khi click/focus ───── */
#quantity::-webkit-inner-spin-button,
#quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

#quantity {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Ô Số lượng lặp + Giãn cách (phút) — ẩn spinner/scroll */
#repeat_count::-webkit-inner-spin-button,
#repeat_count::-webkit-outer-spin-button,
#repeat_interval::-webkit-inner-spin-button,
#repeat_interval::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

#repeat_count,
#repeat_interval {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ── Processing spinner ────────────────────────────────── */
.order-processing-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.order-processing-spinner .spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #4680ff;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.order-processing-spinner .spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: #4680ff;
}

.order-processing-spinner .spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #5d8eff;
    width: 70px;
    height: 70px;
    top: 5px;
    left: 5px;
}

.order-processing-spinner .spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #749cff;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.order-processing-spinner .spinner-ring:nth-child(4) {
    border-top-color: #8baaff;
    width: 50px;
    height: 50px;
    top: 15px;
    left: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ── Product swiper mini-cards ─────────────────────────── */
.productCategoriesSwiper {
    width: 100%;
    padding: 8px 0 18px 0;
}

.productCategoriesSwiper .swiper-slide {
    width: auto;
    height: auto;
}

.product-mini-card {
    width: 170px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-mini-card:hover {
    transform: translateY(-4px);
    border-color: #c7d7ff;
    box-shadow: 0 8px 18px rgba(76, 125, 255, 0.16);
}

.product-mini-thumb {
    width: 100%;
    height: 105px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0e7ff, #f0f4ff);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.product-mini-thumb .thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.product-mini-body {
    text-align: center;
}

.product-mini-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.productCategoriesSwiper .twoline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 576px) {
    .product-mini-card {
        width: 150px;
    }

    .product-mini-thumb {
        height: 90px;
    }
}

/* ── Sidebar products list ─────────────────────────────── */
.col-lg-4 .card.mt-3 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

.products-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f5f9;
}

.products-list::-webkit-scrollbar {
    width: 6px;
}

.products-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.products-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.products-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.product-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.product-item-link {
    display: block;
}

.product-item-link:hover .product-item {
    background-color: #f8f9fa;
}

.product-item-link:hover {
    text-decoration: none;
}

/* (đã bỏ custom typograpy cho select dịch vụ để dùng style gốc từ template) */

/* ── User info card (new-order) — đơn giản, tự nhiên hơn ─ */
.user-info-card-simple {
    background: #ffffff !important;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.user-info-card-simple .card-header {
    background: #ffffff;
    border-color: #e5e7eb;
    padding: 0.85rem 1.25rem;
}

.user-info-card-simple .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.user-info-card-simple .user-info-body {
    padding: 1rem 1.25rem 1.1rem 1.25rem;
}

.user-info-card-simple .user-profile-section {
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.user-info-card-simple .user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    box-shadow: none;
}

.user-info-card-simple .user-status-indicator {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

.user-info-card-simple .user-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.user-info-card-simple .user-username {
    font-size: 0.8rem;
    color: #6b7280;
}

.user-info-card-simple .user-stats-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.9rem;
}

.user-info-card-simple .user-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-info-card-simple .user-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.user-info-card-simple .user-stat-label i {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.user-info-card-simple .user-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.user-info-card-simple .user-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-info-card-simple .user-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.user-info-card-simple .user-action-btn {
    flex: 1;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
}

.user-info-card-simple .user-action-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.user-info-card-simple .user-action-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.user-info-card-simple .user-level-progress {
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.user-info-card-simple .user-level-progress-header {
    margin-bottom: 0.4rem;
}

.user-info-card-simple .user-level-progress-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
}

.user-info-card-simple .user-level-progress-percent {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
}

.user-info-card-simple .user-level-progress-bar {
    height: 6px;
    box-shadow: none;
}

.user-info-card-simple .user-level-progress-fill {
    box-shadow: none;
}

.user-info-card-simple .user-level-progress-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ── User quick actions card ───────────────────────────── */
.user-quick-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.user-quick-card .card-body {
    padding: 0.9rem 1.1rem 1.1rem 1.1rem;
}

.user-quick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.user-quick-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
}

.user-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.5rem;
}

.user-quick-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.user-quick-item:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.user-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 1rem;
}

.user-quick-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-quick-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #111827;
}

.user-quick-sub {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ── User mini stats card ──────────────────────────────── */
.user-mini-stats-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.user-mini-stats-card .card-body {
    padding: 0.9rem 1.1rem 1.1rem 1.1rem;
}

.user-mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
}

.user-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.user-mini-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.user-mini-label i {
    font-size: 0.85rem;
    margin-right: 0.25rem;
    color: #4b5563;
    vertical-align: -1px;
}

/* ── Order notice modal ────────────────────────────────── */
.order-notice-btn span {
    font-size: 0.8rem;
    font-weight: 600;
}

.order-notice-body {
    font-size: 0.85rem;
    color: #111827;
}

.order-notice-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
}

.modal#orderNoticeModal .modal-body,
#orderNoticeModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

#orderNoticeModal .modal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.order-notice-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.4rem;
}

.order-notice-body li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.order-notice-icon-wrap {
    width: 32px;
    height: 32px;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.order-notice-icon-wrap i {
    font-size: 1.1rem;
}

.order-notice-bullet-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.order-notice-bullet-icon-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.order-notice-bullet-icon-warning {
    background: #fffbeb;
    color: #b45309;
}

.order-notice-bullet-icon-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.order-notice-bullet-icon-success {
    background: #ecfdf5;
    color: #15803d;
}

@media (min-width: 992px) {
    .order-notice-list-two-col {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.75rem;
    }
}

.user-mini-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

/* ── Service info box animations ───────────────────────── */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        color: #d32f2f;
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        color: #f44336;
    }
}

@keyframes borderBlink {

    0%,
    100% {
        border-color: #f44336;
        box-shadow: 0 0 3px rgba(244, 67, 54, 0.2);
    }

    50% {
        border-color: #ff5252;
        box-shadow: 0 0 8px rgba(244, 67, 54, 0.5), 0 0 12px rgba(255, 82, 82, 0.3);
    }
}

.service-info-icon {
    display: inline-block;
    width: 1.25rem !important;
    height: 1.25rem !important;
    vertical-align: middle !important;
    animation: pulse 1.5s ease-in-out infinite;
    object-fit: contain;
}

.service-info-box {
    animation: borderBlink 1.5s ease-in-out infinite;
}

/* GPU-accelerated transition for service info */
#service-info-display {
    will-change: transform, opacity, max-height;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#service-info-display .service-info-box {
    will-change: transform;
    transform: translateZ(0);
}

#service-info-display .service-server-info-box {
    will-change: transform;
    transform: translateZ(0);
}

#service-status-content {
    transition: opacity 0.3s ease-in-out;
}

/* ── Thông tin máy chủ — theme xanh ─────────────────────── */
.service-server-info-box {
    background: #eff6ff;
    border: 1px dashed #3b82f6;
    color: #1e40af;
}

.service-server-info-title {
    color: #1d4ed8;
    font-size: 0.95rem;
}

.service-server-info-title .ti {
    font-size: 1.1rem;
    color: #2563eb;
}

.service-server-info-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.service-server-info-top .service-server-info-badges,
.service-server-info-top .service-tags-wrap {
    margin-bottom: 0;
}

.service-server-info-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.service-server-info-badges .badge-light-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.service-server-info-badges .badge-light-success {
    background: #d1fae5;
    color: #047857;
}

.service-server-info-body {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #1e3a8a;
}

.service-server-info-body-text {
    color: #1e40af;
}

/* Thẻ thuộc tính dịch vụ (từ admin) */
.service-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.service-tags-wrap--inline {
    display: inline-flex;
    margin: 0;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.service-tag-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.service-tag-name {
    white-space: nowrap;
}

.service-tag.cselect-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
}

[data-bs-theme="dark"] .service-server-info-box {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.5);
}

[data-bs-theme="dark"] .service-server-info-title,
[data-bs-theme="dark"] .service-server-info-body,
[data-bs-theme="dark"] .service-server-info-body-text {
    color: #93c5fd;
}

/* ── Order confirm modal ───────────────────────────────── */
.order-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.order-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.order-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.order-confirm-modal.show .order-confirm-overlay {
    opacity: 1;
}

.order-confirm-wrapper {
    position: relative;
    width: 95%;
    max-width: 520px;
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.2s ease;
    opacity: 0;
    pointer-events: auto;
}

.order-confirm-modal.show .order-confirm-wrapper {
    transform: translateY(0);
    opacity: 1;
}

.order-confirm-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.order-confirm-header {
    padding: 1.1rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-confirm-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.order-confirm-close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    padding: 0;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.order-confirm-close:hover,
.order-confirm-close:active {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.05);
}

.order-confirm-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.order-confirm-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: flex-start;
}

.order-confirm-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.6rem;
}

.order-confirm-section-title i {
    font-size: 0.95rem;
}

.order-info-list {
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #fff;
}

.order-info-row:nth-child(2n) {
    background-color: #f9fafb;
}

.order-info-row:last-child {
    border-bottom: none;
}

.order-info-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
}

.order-info-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.order-info-value {
    color: #111827;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    max-width: 65%;
}

.order-info-value-link {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
}

.order-price-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.order-price-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9375rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.order-price-item:last-child {
    margin-bottom: 0;
}

.order-price-item.order-price-total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
}

.order-price-item.order-price-total span:last-child {
    color: #dc3545;
    font-size: 1.125rem;
}

.order-confirm-hint {
    font-size: 0.78rem;
    color: #6b7280;
}

.order-confirm-hint i {
    font-size: 0.85rem;
}

@media (min-width: 992px) {
    .order-confirm-wrapper {
        max-width: 820px;
    }

    .order-confirm-layout {
        grid-template-columns: minmax(0, 2.5fr) minmax(0, 2fr);
        gap: 1.5rem;
    }

    .order-info-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .order-info-value {
        font-size: 0.9rem;
        max-width: 75%;
        text-align: right;
    }

    .order-confirm-title {
        font-size: 1.1rem;
    }
}

.order-pin-box {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem 1rem 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.order-pin-label {
    display: block;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.order-pin-input-group .input-group-text {
    border-radius: 999px;
    background: #e0edff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.order-pin-input-group .input-group-text i {
    font-size: 1rem;
}

.order-pin-input {
    text-align: center;
    letter-spacing: 0.25rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    font-weight: 600;
    color: #111827;
    height: 42px;
}

.order-pin-input:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25);
    border-color: #2563eb;
}

.order-pin-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.order-pin-hint {
    display: block;
    margin-top: 0.45rem;
    color: #4b5563;
    font-size: 0.8rem;
}

.order-pin-hint {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.8125rem;
}

.order-confirm-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.order-confirm-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.order-confirm-btn-cancel {
    background: #ffffff;
    color: #6c757d;
    border-color: #ced4da;
}

.order-confirm-btn-cancel:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.order-confirm-btn-submit {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.order-confirm-btn-submit:hover {
    background: #0056b3;
    border-color: #0056b3;
}

@media (max-width: 576px) {
    .order-confirm-wrapper {
        width: 95%;
    }

    .order-confirm-header {
        padding: 1rem 1.25rem;
    }

    .order-confirm-body {
        padding: 1.25rem;
    }

    .order-confirm-footer {
        padding: 1rem;
        flex-direction: column-reverse;
    }

    .order-confirm-btn {
        width: 100%;
    }

    .order-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .order-info-value {
        text-align: left;
        max-width: 100%;
        padding-left: 2rem;
    }
}

/* ── Alert thông báo trang đặt đơn (new-order) ───────────────────── */
.new-order-alert {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0ea5e9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    animation: newOrderAlertIn 0.3s ease-out;
}

.new-order-alert-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.new-order-alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f0f9ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.new-order-alert-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.new-order-alert-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
}

.new-order-alert-body {
    padding: 1rem 1.25rem;
    background: #fff;
}

.new-order-alert-prose {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #475569;
}

.new-order-alert-prose p:last-child {
    margin-bottom: 0;
}

.new-order-alert-prose p {
    margin-bottom: 0.5rem;
}

.new-order-alert-prose strong {
    color: #0f172a;
}

.new-order-alert-prose ul,
.new-order-alert-prose ol {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.new-order-alert-prose li {
    margin-bottom: 0.2rem;
}

.new-order-alert-prose a {
    color: #0ea5e9;
    font-weight: 600;
    text-decoration: none;
}

.new-order-alert-prose a:hover {
    text-decoration: underline;
}

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

[data-bs-theme="dark"] .new-order-alert {
    background: #1e293b;
    border-color: #334155;
    border-left-color: #0ea5e9;
}

[data-bs-theme="dark"] .new-order-alert-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .new-order-alert-body {
    background: #1e293b;
}

[data-bs-theme="dark"] .new-order-alert-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .new-order-alert-icon {
    background: rgba(14, 165, 233, 0.15);
}

[data-bs-theme="dark"] .new-order-alert-prose {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .new-order-alert-prose strong {
    color: #f1f5f9;
}

@media (max-width: 768px) {
    .new-order-alert-header {
        padding: 0.625rem 1rem;
    }

    .new-order-alert-icon {
        width: 32px;
        height: 32px;
    }

    .new-order-alert-body {
        padding: 0.875rem 1rem;
    }

    .new-order-alert-prose {
        font-size: 0.8125rem;
    }
}

/* ── Service status info cards (Trạng thái / Thời gian TB / Hoàn tiền / Bảo hành) ─ */
/* Cả 4 card dùng chung nền/viền, chỉ khác màu viền/icon theo trạng thái */
.service-info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 767px) {
    .service-info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-info-card {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color .2s, box-shadow .2s;
}

.service-info-card:hover {
    border-color: var(--pc-primary, #4680ff);
    box-shadow: 0 2px 8px rgba(70, 128, 255, 0.08);
}

.service-info-cards .service-info-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.service-info-cards .service-info-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1e293b;
}

.service-info-cards .service-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    background: #e2e8f0;
    color: #64748b;
    font-size: 1rem;
    animation: none;
}

.service-info-cards .service-info-icon--success {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.service-info-cards .service-info-icon--primary {
    background: rgba(70, 128, 255, 0.12);
    color: var(--pc-primary, #4680ff);
}

/* Trạng thái & Thời gian trung bình: màu cố định (không phụ thuộc Tailwind) */
/* Trạng thái: cả card xanh lá (nền + viền) */
#service-status-status-box {
    /* background: rgba(34, 197, 94, 0.06) !important;
    border-color: #22c55e !important; */
}

#service-status-status-box .service-status-status-icon,
#service-status-status-box #service-status-active {
    color: #16a34a !important;
}

#service-status-status-box .service-status-status-icon {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

#service-status-status-box .service-status-status-icon i {
    color: inherit !important;
}

/* Thời gian trung bình: cả card xanh dương (nền + viền) */
#service-status-average-time-box {
    /* background: rgba(59, 130, 246, 0.06) !important;
    border-color: #2563eb !important; */
}

#service-status-average-time-box .service-status-average-icon,
#service-status-average-time-box #service-status-average-time {
    color: #2563eb !important;
}

#service-status-average-time-box .service-status-average-icon {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

#service-status-average-time-box .service-status-average-icon i {
    color: inherit !important;
}

/* Bảo hành: chỉ hiển thị 1 SVG, tránh chồng icon */
.service-status-warranty-icon-wrap {
    position: relative;
}

.service-status-warranty-icon-wrap .service-status-warranty-svg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    pointer-events: none;
}

#service-status-warranty-box.has-warranty .service-status-warranty-svg[data-state="off"] {
    display: none !important;
}

#service-status-warranty-box.has-warranty .service-status-warranty-svg[data-state="check"] {
    display: block !important;
}

#service-status-warranty-box.no-warranty .service-status-warranty-svg[data-state="off"] {
    display: block !important;
}

#service-status-warranty-box.no-warranty .service-status-warranty-svg[data-state="check"] {
    display: none !important;
}

/* Mặc định (chưa chọn dịch vụ): chỉ hiện shield-off */
#service-status-warranty-icon .service-status-warranty-svg[data-state="check"] {
    display: none !important;
}

/* Hoàn tiền / Bảo hành: có = xanh, không = đỏ; cùng kiểu nền/viền với 2 card đầu */
#service-status-refund-box.has-refund,
#service-status-warranty-box.has-warranty {
    /* border-color: #22c55e;
    background: rgba(34, 197, 94, 0.06); */
}

#service-status-refund-box.has-refund .service-info-icon,
#service-status-warranty-box.has-warranty .service-info-icon {
    background: #fff;
    color: #16a34a !important;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

#service-status-refund-box .service-info-icon i,
#service-status-refund-box .service-info-icon svg,
#service-status-warranty-box .service-info-icon i,
#service-status-warranty-box .service-info-icon svg {
    color: inherit !important;
    fill: none;
    stroke: currentColor;
}

#service-status-refund-box.has-refund #service-status-refund,
#service-status-warranty-box.has-warranty #service-status-warranty {
    color: #16a34a;
}

#service-status-refund-box.no-refund,
#service-status-warranty-box.no-warranty {
    /* border-color: #f87171;
    background: rgba(248, 113, 113, 0.06); */
}

#service-status-refund-box.no-refund .service-info-icon,
#service-status-warranty-box.no-warranty .service-info-icon {
    background: #fff;
    color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4);
}

#service-status-refund-box.no-refund .service-info-icon i,
#service-status-warranty-box.no-warranty .service-info-icon i {
    color: inherit !important;
}

#service-status-refund-box.no-refund #service-status-refund,
#service-status-warranty-box.no-warranty #service-status-warranty {
    color: #dc2626;
}

/* Dark: Trạng thái & Thời gian trung bình card */
[data-bs-theme="dark"] #service-status-status-box {
    /* background: rgba(34, 197, 94, 0.12) !important;
    border-color: #22c55e !important; */
}

[data-bs-theme="dark"] #service-status-average-time-box {
    /* background: rgba(59, 130, 246, 0.12) !important;
    border-color: #2563eb !important; */
}

/* Dark: cả 4 card cùng nền tối, chữ/icon rõ */
[data-bs-theme="dark"] .service-info-card {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .1);
}

[data-bs-theme="dark"] .service-info-cards .service-info-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .service-info-cards .service-info-value {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .service-info-card:hover {
    border-color: var(--pc-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

[data-bs-theme="dark"] #service-status-refund-box.has-refund,
[data-bs-theme="dark"] #service-status-warranty-box.has-warranty {
    /* border-color: #4ade80;
    background: rgba(34, 197, 94, 0.12); */
}

[data-bs-theme="dark"] #service-status-refund-box.has-refund .service-info-icon,
[data-bs-theme="dark"] #service-status-warranty-box.has-warranty .service-info-icon {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

[data-bs-theme="dark"] #service-status-refund-box.no-refund,
[data-bs-theme="dark"] #service-status-warranty-box.no-warranty {
    /* border-color: #f87171;
    background: rgba(248, 113, 113, 0.1); */
}

[data-bs-theme="dark"] #service-status-refund-box.no-refund .service-info-icon,
[data-bs-theme="dark"] #service-status-warranty-box.no-warranty .service-info-icon {
    background: rgba(248, 113, 113, 0.25);
    color: #f87171;
}