/**
 * Kraft Loyalty Module Styles
 * Version 2.0 - Enhanced UI/UX
 */

/* ========================================
   NAVIGATION & HEADER POINTS DISPLAY
   ======================================== */

.card-body{
  padding: 25px ;
}

.loyalty-nav {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
}

.loyalty-nav a {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.loyalty-nav a:hover {
    color: #764ba2;
}

.loyalty-points-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.app-buttons{
    display: flex;
    justify-content: center;
}

/* ========================================
   ACCOUNT PAGE STYLES
   ======================================== */

/* Main container */
.loyalty-account-page {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Points Summary Card */
.loyalty-summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.loyalty-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loyalty-summary-card .card-body {
    padding: 2.5rem 2rem;
}

/* Points display */
.points-balance {
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
    line-height: 1;
}

.loyalty-summary-card h3 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #495057;
    margin: 0.5rem 0;
}

.loyalty-summary-card .text-muted {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #8898aa !important;
    margin-top: 0.5rem;
}

.loyalty-summary-card .text-success {
    color: #2dce89 !important;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-top: 0.75rem;
}

.loyalty-summary-card small {
    display: block;
    margin-top: 0.5rem;
    color: #8898aa;
    font-size: 0.875rem;
}

/* Column styling */
.loyalty-summary-card .col-md-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
}

.loyalty-summary-card .col-md-4:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #e3e8f0, transparent);
}

/* ========================================
   TIER BADGES
   ======================================== */

.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    border-radius: 100px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    min-width: 150px;
    position: relative;
    overflow: hidden;
}

.tier-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.tier-badge:hover::after {
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: rotate(45deg) translateX(100%); opacity: 0; }
}

.tier-badge.tier-bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.tier-badge.tier-silver {
    background: linear-gradient(135deg, #C0C0C0, #757575);
    color: white;
}

.tier-badge.tier-gold {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: white;
}

.tier-badge.tier-platinum {
    background: linear-gradient(135deg, #E5E4E2, #9CA3AF);
    color: #1F2937;
}

.tier-badge h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 1.25rem;
}

.tier-icon {
    font-size: 2rem;
    margin-right: 10px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.tier-progress {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
    margin-top: 2rem !important;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.tier-progress p {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 1rem;
}

.tier-progress strong {
    color: #667eea;
    font-weight: 700;
}

.progress {
    height: fit-content;
    background-color: #e3e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */

.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover:not(.app-promo-card) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-bottom: 2px solid #e3e8f0;
    padding: 1.5rem;
    border-radius: 14px 14px 0 0 !important;
}

.card-header h5 {
    color: #32325d;
    font-weight: 700;
    margin: 0;
    font-size: 1.35rem;
}

.card h5 {
    color: #32325d;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.card h6 {
    color: #525f7f;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.card .material-icons {
    font-size: 24px;
    margin-right: 10px;
}

/* ========================================
   APP PROMOTION CARD
   ======================================== */

.app-promo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.app-promo-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: float 15s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50%, 50%) rotate(360deg); }
}

.app-promo-card .card-body {
    position: relative;
    z-index: 1;
    padding: 2.5rem 2rem;
}

.app-promo-card h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.app-promo-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.6;
}

.app-promo-card .material-icons {
    color: rgba(255, 255, 255, 0.9);
}

.app-promo-card .btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.app-promo-card .btn:hover {
    background: #f0f2ff;
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.app-promo-card .btn .material-icons {
    color: inherit;
    vertical-align: middle;
    margin-right: 0px;
    font-size: 20px;
}

/* ========================================
   TABLES
   ======================================== */

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 700;
    color: #8898aa;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 1.25rem 1rem;
    background-color: #f6f9fc;
}

.table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    color: #525f7f;
    font-size: 0.95rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9ff;
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.badge {
    padding: 0.45em 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.badge-success {
    background-color: #2dce89;
}

.badge-warning {
    background-color: #fb6340;
}

.badge-info {
    background-color: #11cdef;
}

/* ========================================
   PRODUCT PAGE STYLES
   ======================================== */

.product-loyalty-points {
    margin: 15px 0;
}

.loyalty-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.loyalty-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.loyalty-box i {
    font-size: 20px;
}

.loyalty-value {
    font-size: 18px;
    font-weight: bold;
    margin: 0 5px;
}

/* ========================================
   SHOPPING CART STYLES
   ======================================== */

.cart-loyalty-points {
    margin-top: 20px;
}

.cart-loyalty-points .card {
    border: 2px solid #667eea;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.cart-loyalty-points h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.loyalty-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loyalty-summary i {
    color: #667eea;
    font-size: 24px;
}

.loyalty-summary strong {
    color: #764ba2;
    font-size: 18px;
}

/* ========================================
   REWARDS GRID
   ======================================== */

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.reward-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.reward-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reward-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.reward-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.reward-points {
    color: #667eea;
    font-weight: bold;
    font-size: 18px;
}

.reward-value {
    color: #495057;
    font-size: 14px;
}

/* ========================================
   VOUCHERS LIST
   ======================================== */

.vouchers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.voucher-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.voucher-item:hover {
    background: #f0f2ff;
    transform: translateX(5px);
}

.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

/* ========================================
   CUSTOMER ACCOUNT LINK
   ======================================== */

.link-item i {
    color: #667eea;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media(max-width:990px){
    .app-promo-card .btn{
        padding: 14px 20px;
        font-weight: 600;
        font-size: 0.7rem;
    }

}


@media (max-width: 768px) {
    .points-balance {
        font-size: 3.5rem;
    }
    
    .loyalty-summary-card h3 {
        font-size: 2rem;
    }
    
    .tier-badge {
        padding: 14px 24px;
        min-width: 130px;
    }
    
    .tier-badge h4 {
        font-size: 1rem;
    }
    
    .tier-icon {
        font-size: 1.5rem;
    }
    
    .app-promo-card .btn {
        margin-bottom: 0.75rem;
        width: 100%;
    }
    
    .loyalty-summary-card .col-md-4:not(:last-child)::after {
        display: none;
    }
    
    .loyalty-summary-card .col-md-4:not(:last-child) {
        border-bottom: 1px solid #e3e8f0;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .loyalty-box {
        display: block;
        text-align: center;
    }
    
    .app-promo-card h4 {
        font-size: 1.5rem;
    }
    
    .app-promo-card p {
        font-size: 1rem;
    }
}



@media (max-width: 600px) {
    .app-buttons {
     flex-direction: column;
  }
}
