/* ============================================================
   1. FULL SCREEN OVERLAY & PANEL
   ============================================================ */
#tooniai-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #1b3a5b 0%, #05192d 100%);
    display: none; 
    z-index: 999999;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

#tooniai-panel {
    position: relative;
    width: 95%;
    max-width: 1200px;
    min-height: 80vh;
    color: #ffffff;
    padding: 60px 10px;
    margin: auto;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.tooniai-close {
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 50px;
    cursor: pointer;
    color: #55cce9;
    line-height: 1;
    z-index: 1000001;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.tooniai-close:hover { transform: scale(1.2); color: #ffffff; }

/* ============================================================
   2. GRID & CARD STYLING (Step 1 & 2)
   ============================================================ */
.tooniai-step { display: none; opacity: 0; }
.tooniai-step.active { display: block; opacity: 1; transition: opacity 0.4s ease; }

.tooniai-grid {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.tooniai-card {
    background: #ffffff;
    color: #333333;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    width: 46%; 
    transition: 0.3s ease;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
}

.tooniai-card:hover { transform: translateY(-10px); border-color: #4cc9f0; }
.tooniai-card img { width: 100%; height: 200px; object-fit: cover; }
.tooniai-card-content { padding: 20px; text-align: left; }

.tooniai-icon-container {
    background: #ede9fe;
    width: 70px;
    height: 55px;
    margin: 20px auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooniai-icon-container svg { width: 32px; height: 32px; }

/* ============================================================
   3. MANAGE IMAGES CAROUSEL (Step 3) - FIXED FOR SCROLL
   ============================================================ */
.tooniai-manage-container {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto !important; /* Horizontal scroll enable */
    overflow-y: hidden;
    flex-wrap: nowrap !important; /* Images line mein rahengi */
    padding: 30px 10px;
    margin-top: 30px;
    scrollbar-width: thin;
    scrollbar-color: #4cc9f0 #05192d;
    cursor: grab;
    user-select: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.tooniai-manage-container.grabbing { cursor: grabbing; }

/* Custom Scrollbar Styling */
.tooniai-manage-container::-webkit-scrollbar { height: 8px; }
.tooniai-manage-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 10px; }
.tooniai-manage-container::-webkit-scrollbar-thumb { background: #55cce9; border-radius: 10px; }

#image-preview-area { 
    display: flex !important; 
    gap: 20px; 
    flex-wrap: nowrap !important; /* Forces items to stay in one row */
}

.preview-item { 
    flex: 0 0 180px !important; /* Prevent shrinking[cite: 1] */
    text-align: center; 
    position: relative; 
}

.preview-item img {
    width: 180px; height: 240px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.preview-label {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    margin-top: 15px;
    text-transform: uppercase;
}

.tooniai-add-card {
    flex: 0 0 180px !important; /* Match width with preview items[cite: 1] */
    height: 240px;
    background: #ffffff;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.add-circle {
    width: 45px; height: 45px;
    border: 2px solid #4cc9f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    color: #4cc9f0;
    margin-bottom: 10px;
}

/* ============================================================
   4. FINALIZE ORDER LAYOUT (Step 4)
   ============================================================ */
.tooniai-finalize-container {
    display: flex;
    gap: 30px;
    text-align: left;
    margin-top: 30px;
}

.tooniai-finalize-left { flex: 1.8; }
.tooniai-finalize-right { flex: 1.2; }

.tooniai-white-box {
    background: #ffffff;
    color: #333333;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tooniai-white-box h3 { font-size: 18px; font-weight: 800; color: #1b3a5b; margin-top: 0; }

.tooniai-pricing-table { width: 100%; border-collapse: collapse; }
.tooniai-pricing-table th { color: #888; font-size: 12px; text-align: left; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.tooniai-pricing-table td { padding: 15px 0; font-weight: bold; border-bottom: 1px solid #f9f9f9; cursor: pointer;  text-align:center;}

.selected-variation { background-color: rgba(76, 201, 240, 0.1); }

.tooniai-tiers-grid { display: flex; gap: 15px; margin-bottom: 20px; }
.tier-card {
    background: #fff; color: #333;
    border-radius: 15px; padding: 20px;
    flex: 1; border: 3px solid transparent; transition: 0.3s;
}
.tier-card.active { border-color: #4cc9f0; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.tier-label { font-size: 10px; color: #888; display: block; margin-bottom: 5px; }
.tier-card p { font-size: 10px; }
.tier-price { color: #00b4d8; font-weight: bold; margin-top: 10px; }

.tooniai-summary-card {
    background: #fff; color: #333;
    border-radius: 20px; padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.summary-item-main { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; }
.summary-item-main img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; background: #eee; }

.qty-stepper {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid #ddd; border-radius: 8px;
    padding: 4px 12px; width: fit-content; margin-top: 8px;
}
.qty-stepper button { border: none; background: none; cursor: pointer; font-size: 18px; font-weight: bold; color: #4cc9f0; }

.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: #666; font-size: 14px; }
.total-row { font-weight: 800; color: #00b4d8; font-size: 22px; border-top: 2px solid #f9f9f9; padding-top: 15px; margin-top: 15px; }

/* ============================================================
   5. BUTTONS & UTILITIES
   ============================================================ */
.tooniai-main-btn, .tooniai-checkout-btn {
    width: stretch;
    background: #4cc9f0;
    color: #000;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

.tooniai-main-btn:hover, .tooniai-checkout-btn:hover { background: #55cce9; transform: translateY(-2px); }

.tooniai-back {
    background: none; border: none;
    color: #55cce9; text-decoration: underline;
    cursor: pointer; margin-top: 30px;
    display: block; width: 100%; font-weight: bold;
}

.badge {
    background: #e0faff; color: #00b4d8;
    padding: 4px 10px; border-radius: 5px;
    font-size: 10px; text-transform: uppercase;
}

/* Image Actions Overlay */
.image-actions-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7); display:flex; flex-direction:column;
    justify-content:center; align-items:center; gap:8px;
    opacity:0; transition:0.3s; z-index:10; border-radius:15px;
}
.preview-item:hover .image-actions-overlay { opacity:1; }
.image-actions-overlay button {
    width:70%; padding:6px; font-size:11px; border-radius:5px;
    border:none; cursor:pointer; font-weight:bold; background:#fff; color:#000 !important;
}
.image-actions-overlay button:hover{ background: #55cce9 !important;  color:#fff !important;}
.image-actions-overlay .del-btn { background:#ff4d4d; color:#fff; }

/* Modals */
.tooniai-sub-modal {
    position:fixed; top:0; left:0; width:100%; height:100%;
    background:rgba(0,0,0,0.9); z-index:2000000;
    display:flex; align-items:center; justify-content:center;
}
.modal-content-edit {
    background:#fff; padding:25px; border-radius:20px;
    width:90%; max-width:700px;
}

.close-view-modal {
    position: absolute; top: 20px; right: 30px; font-size: 50px;
    color: #fff; cursor: pointer; z-index: 2000002; transition: 0.3s;
}

.close-view-modal:hover { color: #4cc9f0; transform: scale(1.2); }

.modal-content-view { max-width: 90%; max-height: 90vh; display: flex; justify-content: center; align-items: center; }

#full-view-img { max-width: 100%; max-height: 85vh; border-radius: 10px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

.sortable-ghost { opacity: 0.4; border: 2px dashed #55cce9; }
.preview-item.is-fixed { cursor: default !important; }
/* Table Header Line Styling */
.tooniai-pricing-table thead th {
    text-align: left;
    font-size: 13px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #000; /* Dark line across headers */
    text-transform: uppercase;
    text-align:center;
}

/* Selected Row Design (Cyan Highlight)[cite: 1] */
.tooniai-pricing-table tr.selected-variation {
    background-color: #f0fdff !important; /* Very light cyan */
    border-bottom: 2px solid #00f0ff !important; /* Cyan bottom line */
    border-top: 2px solid #00f0ff !important;    /* Cyan top line */
}

/* Screenshot Style Badges[cite: 1] */
.tni-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.badge-popular { background: #00f0ff; color: #000; } /* Most Popular Cyan */
.badge-standard, .badge-large, .badge-gallery { background: #f1f1f1; color: #666; }

/* Light state (unselected) */
.tni-badge.badge-unselected {
    background: #f1f1f1;
    color: #888;
}

/* Dark state (selected)[cite: 1] */
.tni-badge.badge-selected-dark {
    background: #00f0ff !important; /* Dark Cyan/Purple as per your theme */
    color: #000 !important;
    font-weight: 900;
    box-shadow: 0 2px 5px rgba(0, 240, 255, 0.3);
}

/* Common badge styling */
.tni-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    transition: 0.3s;
    display: inline-block;
}
.tier-mini {
    padding: 20px;
    border-radius: 10px;
    border: 1px solid;
}
.tooniai-main-btn{
    width: fit-content !important;
margin-top:40px;
}
 .tooniai-checkout-btn {
    background: #00f0ff !important;
    color: #fff !important;
    width: 100% !important;
    border: none !important;
    font-weight: 700 !important;
}
.qty-stepper button:hover{
    background: #00f0ff !important;
    color: #fff !important;
    border-color: #00f0ff !important;
}
/* Responsiveness */
@media (max-width: 768px) {
    .tooniai-finalize-container { flex-direction: column; }
    .tooniai-card { width: 100%; }
    .tooniai-tiers-grid { flex-direction: column; }
}
@media (max-width: 480px) {
h2 { font-size: 1.5rem !important;}
h3 {font-size: 1.4rem !important; }
.tooniai-pricing-table thead th{ font-size: 12px !important; padding: 10px 0; }
.tooniai-summary-card{ padding: 10px !important; }
.tooniai-close{ top: 6px; right: 29px; font-size: 43px;}
 
}