/* ============================================================
   Ky Tran Cac — Embed-only stylesheet
   Hard-coded colors and IE-friendly layout (no CSS variables,
   no grid, no gap, no inset, no backdrop-filter).
   Matches markup in Areas/Profile/Views/Shop/_ShopItemsPartial.cshtml.
   ============================================================ */

html, body {
    margin: 0;
    padding: 0;
    background: #0d0d14;
    color: #e8e6e3;
    font-family: 'Noto Sans', Arial, sans-serif;
    font-size: 14px;
}

* { box-sizing: border-box; }

.shop-embed-container {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- Tab navigation ---------- */
.embed-tabs {
    background: #0a0a10;
    border-bottom: 1px solid rgba(241, 196, 15, 0.2);
    padding: 0 16px;
    overflow: hidden;
    white-space: nowrap;
}

.embed-tab {
    display: inline-block;
    padding: 12px 18px;
    color: #9a9a9a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-right: 4px;
}

.embed-tab:hover {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.05);
}

.embed-tab.active {
    color: #f1c40f;
    border-bottom-color: #f1c40f;
    background: rgba(241, 196, 15, 0.08);
}

.embed-page-title {
    color: #f1c40f;
    font-size: 22px;
    margin: 0 0 16px 0;
    font-weight: 700;
}

/* ---------- Tables (Purchases / Deposits) ---------- */
.embed-table-wrap {
    background: #151520;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: auto;
}

.embed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.embed-table th {
    background: #1a1a28;
    color: #f1c40f;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(241, 196, 15, 0.2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.embed-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e8e6e3;
    vertical-align: top;
}

.embed-table tr:last-child td {
    border-bottom: 0;
}

.embed-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.embed-table .col-name {
    color: #f9d923;
    font-weight: 500;
}

.embed-table .text-right {
    text-align: right;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.badge-self {
    background: rgba(52, 152, 219, 0.18);
    color: #5dade2;
}

.badge-gift {
    background: rgba(230, 126, 34, 0.18);
    color: #f39c12;
}

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: #9a9a9a;
}

.status-completed,
.status-success {
    background: rgba(46, 204, 113, 0.18);
    color: #2ecc71;
}

.status-pending {
    background: rgba(241, 196, 15, 0.18);
    color: #f1c40f;
}

.status-failed,
.status-cancelled {
    background: rgba(255, 71, 87, 0.18);
    color: #ff4757;
}

/* ---------- Card list (Guides / News) ---------- */
.embed-card-list {
    margin: 0 -6px;
    overflow: hidden;
}

.embed-card {
    float: left;
    width: 50%;
    box-sizing: border-box;
    padding: 6px;
    cursor: pointer;
}

.embed-card-thumb {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #1a1a28;
    border-radius: 8px 8px 0 0;
}

.embed-card-thumb img {
    width: 100%;
    height: 100%;
    display: block;
}

.embed-card-body {
    background: #151520;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    padding: 12px 14px;
}

.embed-card:hover .embed-card-body {
    border-color: rgba(241, 196, 15, 0.4);
    background: #1a1a28;
}

.embed-card-meta {
    margin-bottom: 6px;
    font-size: 11px;
}

.embed-card-date {
    color: #888;
    margin-left: 6px;
}

.embed-card-title {
    color: #f1c40f;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.embed-card-excerpt {
    color: #b0b0b0;
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 10px 0;
    max-height: 54px;
    overflow: hidden;
}

.embed-card-readmore {
    background: transparent;
    border: 0;
    color: #f1c40f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.embed-card-readmore:hover {
    color: #f9d923;
}

/* ---------- Content modal (full guide / news content) ---------- */
.embed-content-modal {
    max-width: 760px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.embed-content-meta {
    color: #888;
    font-size: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.embed-content-body {
    color: #e8e6e3;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.embed-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}

.embed-content-body h1,
.embed-content-body h2,
.embed-content-body h3 {
    color: #f1c40f;
    margin: 16px 0 8px 0;
}

.embed-content-body p {
    margin: 0 0 10px 0;
}

.embed-content-body a {
    color: #f9d923;
}

.embed-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.embed-content-body table th,
.embed-content-body table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    text-align: left;
}

.embed-content-body table th {
    background: #1a1a28;
    color: #f1c40f;
}

.embed-content-body ul,
.embed-content-body ol {
    margin: 8px 0;
    padding-left: 24px;
}

/* ---------- Header ---------- */
.shop-header {
    overflow: hidden;
    margin-bottom: 16px;
}

.shop-title {
    float: left;
    color: #f1c40f;
    font-size: 24px;
    margin: 0;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.shop-header-right {
    float: right;
}

.shop-btn-deposit {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    padding: 7px 16px;
    background: #2ecc71;
    border: 1px solid #27ae60;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.shop-btn-deposit:hover {
    background: #27ae60;
}

.shop-balance {
    display: inline-block;
    vertical-align: middle;
    background: #151520;
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: 8px;
    padding: 6px 14px;
}

.shop-balance-label {
    color: #888;
    font-size: 12px;
    margin-right: 4px;
}

.shop-balance-value {
    color: #f9d923;
    font-weight: 700;
    font-size: 18px;
    margin: 0 4px;
}

/* ---------- Categories ---------- */
.shop-categories {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-category-tab {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 6px 6px 0;
    border-radius: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #9a9a9a;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.shop-category-tab:hover {
    border-color: #f1c40f;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.08);
}

.shop-category-tab.active {
    background: #f1c40f;
    border-color: #f1c40f;
    color: #0d0d14;
    font-weight: 600;
}

/* ---------- Item grid (inline-block columns, IE 8+) ---------- */
.shop-grid {
    font-size: 0; /* kill whitespace between inline-blocks */
    margin: 0 -4px;
}

.shop-empty {
    font-size: 14px;
    text-align: center;
    padding: 40px 16px;
    color: #888;
}

.shop-item-card {
    display: inline-block;
    vertical-align: top;
    width: 50%;
    padding: 4px;
    font-size: 14px;
    margin-bottom: 0;
}

/* The visible card (uses ::before/::after-free pattern via padding wrapper).
   Since the partial has no inner wrapper, paint background on .shop-item-card
   itself and accept that the gutter is the padding inside box-sizing:border-box. */
.shop-item-card {
    background-clip: content-box;
    background-color: #151520;
}

.shop-item-card {
    border: 4px solid transparent; /* gutter via transparent border */
    background-origin: padding-box;
}

/* Reset the above experiment — use an outer-padding approach instead.
   Actually simplest: the ITEM is the card; gutter uses margin between items. */
.shop-item-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #151520;
    background-clip: border-box;
    border-radius: 10px;
    padding: 0;
    margin: 0 0.5% 8px 0.5%;
    width: 49%;
    overflow: hidden;
}

.shop-item-card:hover {
    border-color: rgba(241, 196, 15, 0.4);
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.1);
}

/* Icon (left) ---------- */
.shop-item-icon {
    float: left;
    width: 64px;
    height: 64px;
    margin: 10px;
    background: #1a1a28;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    text-align: center;
    line-height: 64px;
    overflow: hidden;
    position: relative;
}

.shop-item-icon img {
    width: 100%;
    height: 100%;
    vertical-align: top;
    border: 0;
}

.shop-item-icon-placeholder {
    color: #888;
    font-size: 24px;
    line-height: 64px;
}

.shop-item-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.shop-item-badge.featured {
    background: #f1c40f;
    color: #0d0d14;
}

.shop-item-badge.sale {
    background: #ff4757;
    color: #fff;
}

/* Content (right of icon) ---------- */
.shop-item-content {
    overflow: hidden; /* BFC, fills remaining width */
}

.shop-item-body {
    padding: 10px 12px 8px 0;
}

.shop-item-name {
    font-weight: 600;
    color: #f1c40f;
    margin: 0 0 4px 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-item-desc {
    color: #888;
    font-size: 12px;
    margin: 0 0 6px 0;
    line-height: 1.3;
    max-height: 32px;
    overflow: hidden;
}

.shop-item-price {
    font-size: 14px;
}

.price-original {
    text-decoration: line-through;
    color: #888;
    font-size: 11px;
    margin-right: 4px;
}

.price-current {
    color: #f9d923;
    font-weight: 700;
    font-size: 15px;
    margin-right: 4px;
}

.price-unit {
    color: #888;
    font-size: 11px;
}

/* Item action buttons (full-width row at bottom) ---------- */
.shop-item-actions {
    clear: both;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.shop-item-actions .shop-btn {
    float: left;
    width: 50%;
    padding: 9px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 0;
    cursor: pointer;
    text-align: center;
    background: transparent;
    color: #9a9a9a;
    font-family: inherit;
}

.shop-item-actions .shop-btn-buy {
    color: #f1c40f;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-item-actions .shop-btn-buy:hover {
    background: rgba(241, 196, 15, 0.15);
    color: #f9d923;
}

.shop-item-actions .shop-btn-gift:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e8e6e3;
}

/* ---------- Modals ---------- */
.shop-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1500;
    text-align: center;
}

.shop-modal-overlay.active {
    display: block;
}

.shop-modal-overlay.active:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    width: 0;
}

.shop-modal {
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    background: #151520;
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 10px;
    padding: 20px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shop-modal-title {
    color: #f1c40f;
    font-size: 18px;
    margin: 0 0 14px 0;
    font-weight: 600;
}

.shop-modal-body {
    margin-bottom: 18px;
}

.shop-modal-body .form-group {
    margin-bottom: 10px;
}

.shop-modal-body label {
    display: block;
    color: #9a9a9a;
    font-size: 13px;
    margin-bottom: 4px;
}

.shop-modal-body input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    background: #1a1a28;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #e8e6e3;
    font-size: 13px;
    outline: none;
}

.shop-modal-body input[type="text"]:focus {
    border-color: #f1c40f;
}

.shop-modal-footer {
    text-align: right;
}

.shop-modal-footer .shop-modal-btn {
    display: inline-block;
    padding: 8px 18px;
    margin-left: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    outline: none;
    font-family: inherit;
}

.shop-modal-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #9a9a9a;
}

.shop-modal-btn-cancel:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: #e8e6e3;
}

.shop-modal-btn-confirm {
    background: #f1c40f;
    color: #0d0d14;
}

.shop-modal-btn-confirm:hover {
    background: #f9d923;
}

.shop-modal-btn-confirm[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-modal-item-info {
    overflow: hidden;
    padding: 10px;
    background: #1a1a28;
    border-radius: 6px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.shop-modal-item-info img {
    float: left;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid rgba(241, 196, 15, 0.2);
    margin-right: 10px;
}

.shop-modal-item-name {
    font-weight: 600;
    color: #f1c40f;
    font-size: 14px;
}

.shop-modal-item-price {
    color: #f9d923;
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px;
}

.shop-modal-confirm-text {
    color: #9a9a9a;
    font-size: 13px;
    line-height: 1.5;
}

.recipient-status {
    font-size: 12px;
    margin-top: 4px;
    min-height: 1em;
}

.recipient-status.valid { color: #2ecc71; }
.recipient-status.invalid { color: #ff4757; }

/* ---------- Deposit (chuyen khoan QR) ---------- */
.deposit-presets {
    overflow: hidden;
    margin: 0 -3px;
}

.deposit-preset {
    float: left;
    width: 31%;
    height: 36px;
    line-height: 22px;
    margin: 0 1% 6px 1%;
    padding: 6px 4px;
    text-align: center;
    color: #f9d923;
    font-size: 13px;
    font-weight: 600;
    background: #1a1a28;
    border: 1px solid rgba(241, 196, 15, 0.25);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.deposit-preset:hover {
    background: rgba(241, 196, 15, 0.12);
    border-color: #f1c40f;
    color: #fff;
}

.deposit-qr-modal {
    max-width: 460px;
}

.deposit-qr-wrap {
    text-align: center;
    margin-bottom: 14px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.deposit-qr-wrap img {
    width: 220px;
    height: 220px;
    display: block;
    margin: 0 auto;
}

.deposit-info {
    background: #1a1a28;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.deposit-info-row {
    overflow: hidden;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.deposit-info-row:last-child {
    border-bottom: 0;
}

.deposit-info-row span {
    float: left;
    color: #888;
}

.deposit-info-row b {
    float: right;
    color: #e8e6e3;
    font-weight: 600;
}

.deposit-code {
    color: #f9d923 !important;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.05em;
}

.deposit-status {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background: rgba(241, 196, 15, 0.08);
    color: #f1c40f;
    font-size: 13px;
    font-weight: 500;
}

.deposit-status.success {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.deposit-status.error {
    background: rgba(255, 71, 87, 0.12);
    color: #ff4757;
}

/* ---------- Pagination ---------- */
.shop-pagination {
    text-align: center;
    margin-top: 18px;
}

.shop-pagination .page-link {
    display: inline-block;
    min-width: 30px;
    padding: 6px 10px;
    margin: 0 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #9a9a9a;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
}

.shop-pagination .page-link:hover {
    border-color: #f1c40f;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.08);
}

.shop-pagination .page-link.active {
    background: #f1c40f;
    border-color: #f1c40f;
    color: #0d0d14;
    font-weight: 600;
}

.shop-pagination .page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- Toast ---------- */
.shop-toast {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    z-index: 2000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.shop-toast.show { display: block; }
.shop-toast.success { background: #2ecc71; }
.shop-toast.error { background: #ff4757; }

/* ---------- Single column on narrow viewports ---------- */
@media (max-width: 600px) {
    .shop-item-card { width: 99%; margin: 0 0 8px 0; }
    .shop-title { float: none; display: block; margin-bottom: 8px; }
    .shop-balance { float: none; display: inline-block; }
    .shop-header-right { float: none; }
    .embed-card { width: 100%; }
    .embed-tabs { padding: 0 8px; }
    .embed-tab { padding: 10px 10px; font-size: 12px; }
}
