/* =========================================================
   Gemstone Portal International CSS
   Imports Diamond Portal International CSS
   ========================================================= */

@import url('diamond-portal-intl-public.css');

.gemstone-portal-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Gemstone cart cards. Kept under this page scope so the shared portal styles
 * and the legacy cart tables cannot affect the card layout. */
#gemstone_cart_page .gemstone-cart-card-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

#gemstone_cart_page .order-summary-card {
    --card-theme-color: var(--natural-diamond-color, #897358);
    --card-theme-bg: #fdfbf7;
    --card-theme-border: rgba(137, 115, 88, 0.22);
    --card-theme-divider: rgba(137, 115, 88, 0.18);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    transition: box-shadow .2s ease, border-color .2s ease;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

#gemstone_cart_page .order-summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    border-color: #cbd5e1;
}

#gemstone_cart_page .card-left-sec {
    display: flex;
    align-items: center;
    gap: 14px;
    width: auto;
    min-width: 225px;
    flex-shrink: 0;
}

#gemstone_cart_page .card-item-index {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

#gemstone_cart_page .card-thumb-box {
    width: 76px;
    height: 76px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#gemstone_cart_page .card-thumb-box:hover {
    border-color: var(--card-theme-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

#gemstone_cart_page .card-thumb-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}

#gemstone_cart_page .card-thumb-box:hover img {
    transform: scale(1.06);
}

#gemstone_cart_page .card-thumb-box>i {
    font-size: 32px;
    color: #cbd5e1;
}

#gemstone_cart_page .thumb-media-actions {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 5;
    width: 100%;
    pointer-events: none;
}

#gemstone_cart_page .thumb-icon-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
    transition: transform .2s ease, box-shadow .2s ease;
    padding: 0;
    line-height: 1;
    outline: none !important;
    pointer-events: auto;
}

#gemstone_cart_page .thumb-icon-btn i {
    font-size: 11px !important;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

#gemstone_cart_page .thumb-icon-btn.img-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
}

#gemstone_cart_page .thumb-icon-btn.video-btn {
    background: var(--card-theme-color);
    color: #fff;
    padding-left: 2px;
    border: 1px solid rgba(255, 255, 255, .4);
}

#gemstone_cart_page .thumb-icon-btn:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .38);
}

#gemstone_cart_page .card-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

#gemstone_cart_page .card-order-code {
    font-size: 16px;
    font-weight: 700;
    color: var(--card-theme-color);
    line-height: 1.2;
    white-space: nowrap !important;
}

#gemstone_cart_page .card-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#gemstone_cart_page .card-badge-type {
    background: #e2e8f0;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.2;
}

#gemstone_cart_page .card-badge-cert {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.2;
}

#gemstone_cart_page .card-badge-media {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.2;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all .2s ease;
}

#gemstone_cart_page .video-badge {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

#gemstone_cart_page .video-badge:hover {
    background: #dc2626;
    color: #fff;
}

#gemstone_cart_page .image-badge {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #7dd3fc;
}

#gemstone_cart_page .image-badge:hover {
    background: #0284c7;
    color: #fff;
}

#gemstone_cart_page .card-middle-sec {
    flex-grow: 1;
    background: var(--card-theme-bg);
    border: 1px solid var(--card-theme-border);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .02);
}

#gemstone_cart_page .card-spec-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 24px;
    justify-content: space-evenly;
}

#gemstone_cart_page .spec-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 0 auto;
}

#gemstone_cart_page .spec-item-wide {
    flex: 0 0 auto;
}

#gemstone_cart_page .spec-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 3px;
}

#gemstone_cart_page .spec-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#gemstone_cart_page .spec-value a {
    color: var(--card-theme-color);
    font-weight: 700;
    text-decoration: underline;
}

#gemstone_cart_page .card-spec-divider {
    display: none !important;
}

#gemstone_cart_page .card-right-sec {
    width: 170px;
    min-width: 170px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    text-align: right;
    gap: 12px;
    align-self: stretch;
    padding-top: 2px;
    padding-bottom: 2px;
}

#gemstone_cart_page .card-cancel-btn-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    gap: 6px;
    align-items: center;
}

#gemstone_cart_page .btn-convert-order {
    border: 1px solid #897358;
    color: #fff;
    background: #897358;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .2s ease;
    line-height: 1;
    text-transform: uppercase;
}

#gemstone_cart_page .btn-convert-order:hover {
    background: #6f5c44;
    color: #fff;
    border-color: #6f5c44;
}

#gemstone_cart_page .btn-cancel-order {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .2s ease;
    line-height: 1;
}

#gemstone_cart_page .btn-cancel-order:hover {
    background: #ef4444;
    color: #fff;
}

#gemstone_cart_page .card-price-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
    margin: auto 0;
    width: 100%;
}

#gemstone_cart_page .price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

#gemstone_cart_page .price-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

#gemstone_cart_page .price-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--card-theme-color);
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

#gemstone_cart_page .cart-empty-state {
    padding: 32px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    color: #64748b;
    background: #fff;
}

@media (max-width: 1399px) {
    #gemstone_cart_page .card-spec-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px 16px;
    }
}

@media (max-width: 1199px) {
    #gemstone_cart_page .order-summary-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    #gemstone_cart_page .card-left-sec {
        width: 100%;
        min-width: 0;
        padding-right: 175px;
        box-sizing: border-box;
        gap: 12px;
    }

    #gemstone_cart_page .card-middle-sec {
        width: 100%;
        box-sizing: border-box;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 12px 16px !important;
    }

    #gemstone_cart_page .card-spec-grid {
        display: contents !important;
    }

    #gemstone_cart_page .card-spec-divider {
        display: none !important;
    }

    #gemstone_cart_page .spec-item-wide {
        grid-column: span 1 !important;
    }

    #gemstone_cart_page .card-right-sec {
        position: absolute;
        top: 16px;
        right: 16px;
        width: auto;
        min-width: 0;
        align-items: flex-end;
        justify-content: flex-start;
        gap: 6px;
        padding: 0;
        margin: 0;
        z-index: 2;
    }

    #gemstone_cart_page .card-cancel-btn-wrap {
        width: auto;
    }

    #gemstone_cart_page .card-price-block {
        align-items: flex-end;
        text-align: right;
        margin: 0;
        width: auto;
    }

    #gemstone_cart_page .price-row {
        align-items: flex-end;
        text-align: right;
        width: auto;
    }

    #gemstone_cart_page .price-label {
        text-align: right;
        width: auto;
        font-size: 9.5px;
    }

    #gemstone_cart_page .price-value {
        text-align: right;
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    #gemstone_cart_page .card-middle-sec {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px 12px !important;
    }
}

@media (max-width: 767px) {
    #gemstone_cart_page .order-summary-card {
        padding: 14px;
        gap: 12px;
    }

    #gemstone_cart_page .card-left-sec {
        padding-right: 135px;
        gap: 10px;
    }

    #gemstone_cart_page .card-thumb-box {
        width: 56px !important;
        height: 56px !important;
    }

    #gemstone_cart_page .thumb-media-actions {
        bottom: 2px;
        gap: 4px;
    }

    #gemstone_cart_page .thumb-icon-btn {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    #gemstone_cart_page .thumb-icon-btn i {
        font-size: 9px !important;
    }

    #gemstone_cart_page .card-middle-sec {
        padding: 12px 14px;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px 12px !important;
    }

    #gemstone_cart_page .card-right-sec {
        top: 14px;
        right: 14px;
        gap: 4px;
    }

    #gemstone_cart_page .card-order-code {
        font-size: 15px;
    }

    #gemstone_cart_page .spec-label {
        font-size: 9px;
    }

    #gemstone_cart_page .spec-value {
        font-size: 11.5px;
    }

    #gemstone_cart_page .price-value {
        font-size: 14px;
    }
}

@media (max-width: 479px) {
    #gemstone_cart_page .order-summary-card {
        padding: 10px;
        gap: 10px;
    }

    #gemstone_cart_page .card-left-sec {
        padding-right: 115px;
        gap: 6px;
    }

    #gemstone_cart_page .card-thumb-box {
        width: 48px !important;
        height: 48px !important;
    }

    #gemstone_cart_page .thumb-media-actions {
        bottom: 1px;
        gap: 3px;
    }

    #gemstone_cart_page .thumb-icon-btn {
        width: 17px;
        height: 17px;
        min-width: 17px;
        min-height: 17px;
    }

    #gemstone_cart_page .thumb-icon-btn i {
        font-size: 8px !important;
    }

    #gemstone_cart_page .card-item-index {
        font-size: 12px;
        width: 14px;
    }

    #gemstone_cart_page .card-middle-sec {
        padding: 8px 10px;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px 10px !important;
    }

    #gemstone_cart_page .card-right-sec {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    #gemstone_cart_page .btn-cancel-order {
        font-size: 9px;
        padding: 2px 6px;
    }

    #gemstone_cart_page .card-order-code {
        font-size: 13px;
    }

    #gemstone_cart_page .price-label {
        font-size: 8px;
    }

    #gemstone_cart_page .price-value {
        font-size: 12px;
    }

    #gemstone_cart_page .spec-label {
        font-size: 8.5px;
    }

    #gemstone_cart_page .spec-value {
        font-size: 11px;
    }
}

/* =========================================================
   Gemstone Search Pills & Shape Cards Selected Styles
   ========================================================= */
.search_pill,
.pill-btn,
.shape_card {
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease-in-out;
}

.search_pill.selected:not(.types):not(.dia_australia),
.search_pill.active:not(.types):not(.dia_australia),
.pill-btn.selected,
.pill-btn.active {
    border-color: var(--inline-theme-color, #897358) !important;
    background: #f3ece2 !important;
    background: color-mix(in srgb, var(--inline-theme-color, #897358) 12%, #fff) !important;
    color: var(--inline-theme-color, #897358) !important;
    font-weight: 600 !important;
}

.search_pill.selected:not(.types):not(.dia_australia) *,
.pill-btn.selected * {
    color: var(--inline-theme-color, #897358) !important;
}

.search_pill.types.selected {
    border-color: var(--inline-theme-color, #897358) !important;
    background-color: var(--inline-theme-color, #897358) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

.search_pill.types.selected * {
    color: #ffffff !important;
}

.shape_card.selected {
    border-color: var(--inline-theme-color, #897358) !important;
    background-color: var(--inline-theme-color, #897358) !important;
}

.shape_card.selected h5,
.shape_card.selected span,
.shape_card.selected p {
    color: #ffffff !important;
}

.shape_card.selected img {
    filter: brightness(0) invert(1) !important;
}

.input-range-adjusted,
.input-range-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
    background-color: #fef2f2 !important;
    transition: all 0.3s ease;
}