/* ==========================================================================
   Theme-E Coupons & Reward Redemption Code Stylesheet
   Matches Photo 2 (theme e.anotechsolutions.shop/gift_coupon)
   ========================================================================== */

/* Page Active Body Overrides */
body.gift-page-active {
    background-color: #021447 !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive Container Sizing */
@media screen and (min-width: 501px) {
    body.gift-page-active #app,
    #theme-e-gift-root {
        width: 100% !important;
        max-width: 500px !important;
        margin: 0 auto !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
    }
}

@media screen and (max-width: 500px) {
    body.gift-page-active #app,
    #theme-e-gift-root {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
}

body.gift-page-active #app > *:not(#theme-e-gift-root) {
    display: none !important;
}

body.gift-page-active .tabbar-container,
body.gift-page-active .app-tabber {
    display: none !important;
}

/* Also style native Vue classes just in case */
.ticket-wrapper,
.gift-wrapper {
    background-color: #021447 !important;
    min-height: 100vh !important;
}

/* Root Container for Theme-E Coupons & Reward Redemption */
#theme-e-gift-root {
    width: 100%;
    min-height: 100vh;
    background: #021447;
    position: relative;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


/* Top App Header with absolute pinned buttons */
.gift-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 48px;
    background: #00287a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100;
    box-sizing: border-box;
    padding: 0 46px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-back-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.gift-back-btn:active {
    opacity: 0.7;
}

.gift-back-btn svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gift-header-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #ffd04d;
    letter-spacing: 0.15px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-history-icon-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gift-history-icon-btn:active {
    opacity: 0.7;
}

.gift-history-icon-btn svg {
    width: 21px;
    height: 21px;
    fill: #ffd04d;
}

/* Top Gift Banner */
.gift-banner-box {
    margin: 8px 12px 6px 12px;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
    background: #041747;
}

.gift-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* Card 1: Gift Redemption Code Input Card */
.gift-card {
    border: 1.5px solid #d89b1e;
    border-radius: 12px;
    background: linear-gradient(180deg, #002b8a 0%, #001f66 100%);
    margin: 8px 12px;
    padding: 14px 12px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 20, 70, 0.4);
}

.gift-card-title {
    font-size: 14.5px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 10px;
}

.gift-input-wrap {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.gift-input {
    width: 100%;
    height: 40px;
    background: #041747;
    border: 1px solid #1a3c85;
    border-radius: 6px;
    padding: 0 12px;
    box-sizing: border-box;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s ease;
}

.gift-input:focus {
    border-color: #d89b1e;
}

.gift-input::placeholder {
    color: #5b75a6;
    font-size: 13px;
}

.gift-confirm-btn {
    width: 135px;
    height: 36px;
    margin: 0 auto;
    border-radius: 20px;
    background: linear-gradient(180deg, #f7d067 0%, #d89b1e 100%);
    color: #3b2300;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 3px 10px rgba(216, 155, 30, 0.35);
}

.gift-confirm-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Card 2: Official Channels Card */
.gift-channels-card {
    border: 1.5px solid #d89b1e;
    border-radius: 12px;
    background: linear-gradient(180deg, #002b8a 0%, #001f66 100%);
    margin: 8px 12px;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 20, 70, 0.4);
}

.gift-channels-title {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 10px;
}

.gift-channels-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.gift-channel-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 42px;
    background: linear-gradient(180deg, #1e58d4 0%, #113aa0 100%);
    border: 1px solid #2d6de6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    box-sizing: border-box;
    padding: 0 4px;
    overflow: hidden;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.gift-channel-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.gift-btn-join {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
}

.gift-btn-whatsapp {
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.gift-wa-line1 {
    color: #ffd24d;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.gift-wa-line2 {
    color: #ffd24d;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* Card 3: Claim History Table */
.gift-table-box {
    margin: 8px 12px 30px 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #16327c;
    box-sizing: border-box;
}

.gift-table-head {
    height: 38px;
    background: #0e45b8;
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.gift-table-head-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.gift-table-head-col:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.gift-table-body {
    background: #021447;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px 0;
    width: 100%;
}

.gift-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.gift-empty-img {
    width: 90px;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.gift-empty-text {
    font-size: 12px;
    color: #7e97c4;
}

.gift-record-row {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gift-record-row:last-child {
    border-bottom: none;
}

.gift-record-col {
    flex: 1;
    text-align: center;
    font-size: 12.5px;
    color: #9eb6de;
}

.gift-record-col.amount {
    color: #d89b1e;
    font-weight: 700;
}

/* Toast Message Notification */
.gift-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
