/* ==========================================
   Custom WooCommerce PDF Cart Styles
   Author: Sangam Kumar Maurya
   Email: sangamkmaurya93@gmail.com
   Version: 4.5
   Description: Styles for header cart, mini-cart popup, cart page, 
   notifications, form, and thank-you page.
   ========================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* ---------- Global Font ---------- */
body {
    font-family: 'Poppins', sans-serif;
}

/* ==========================================
   Number Input Spinner Fix
   - Force show spinner arrows in Chrome / Edge / Safari
   ========================================== */
input[type=number] {
    -webkit-appearance: number-input !important;
    -moz-appearance: number-input !important;
    appearance: number-input !important;
}

/* Re-enable spinner buttons */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    display: inline-block !important;
    margin: 0;
}

/* ==========================================
   Header Cart Button
   ========================================== */
#custom-cart-button {
    position: fixed;
    top: 1rem;
    right: 1.85rem;
    background: transparent;
    color:  #2e2e2e;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    z-index: 9999;
    border:1px solid #2e2e2e !important;
}

/* ==========================================
   Mini-Cart Popup
   ========================================== */
#custom-cart-popup {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    width: 400px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 20px;
    z-index: 9999;
}

/* Open state for mini-cart */
#custom-cart-popup.open {
    display: block;
}

/* ---------- Cart Items List ---------- */
.cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 260px; /* Approx 4 items visible */
    overflow-y: auto;
}

.cart-items li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

/* ---------- Thumbnails ---------- */
.cart-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ---------- Item Info ---------- */
.cart-info {
    flex: 1;
    font-size: 15px;
}

.cart-price {
    font-size: 14px;
    color: #888;
}

/* ---------- Remove Buttons ---------- */
.remove-item,
.remove-item-page {
    background: none;
    border: none;
    color: #d00;
    font-size: 16px;
    cursor: pointer;
    margin-right: 20px;
}

.remove-item:hover,
.remove-item-page:hover {
    color: #000;
}

/* Remove icon colors */
.remove-item i, 
.remove-item-page i {
  color:#EF2E31; 
  font-size: 16px; 
  cursor: pointer;
}

.remove-item:hover i, 
.remove-item-page:hover i {
  color: darkred;
}

/* ---------- Proceed / Submit Buttons ---------- */
.modern-proceed,
.submit-btn {
    background: #c7a34f;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

/* ---------- Quantity Input & Buttons ---------- */
.custom-cart-qty,
.qty-input {
    width: 60px  !important;
    height: 32px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 4px !important;
    box-sizing: border-box;
}

.qty-minus,
.qty-plus {
    min-width: 30px;
    height: 30px;
    line-height: 1;
    padding: 0 6px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
}

/* ==========================================
   Notifications (Bottom-Right)
   ========================================== */
.cart-success,
.form-success {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 99999;
}

/* ---------- View Product Link ---------- */
.btn-view {
    display: inline-block;
    background: #2e2e2e;
    color: #fff !important;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    margin-left: 28px;
}

/* ---------- Quantity Badge ---------- */
.qty-badge {
    background: #ffc107;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: bold;
}

/* ---------- Cart Total ---------- */
.cart-total {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: right;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* ==========================================
   Cart / Form Layout
   ========================================== */
.custom-form-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px auto;
    max-width: 1000px;
    padding: 20px;
}

/* ---------- Cart Summary Box ---------- */
.cart-summary {
    flex: 1 1 55%;
    background: #fafafa;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 400px; /* Fixed height for scroll */
}

.cart-list-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* ---------- Cart Form Box ---------- */
.cart-form {
    flex: 1 1 40%;
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
}

.cart-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ---------- Cart Page Items ---------- */
#cart-items-page {
    margin: 0;
    padding: 0;
    list-style: none;
}

#cart-items-page li {
    margin-bottom: 15px;
}

.cart-item-box {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
}

.cart-item-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cart-item-content {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.cart-item-details {
    font-size: 14px;
    margin-bottom: 8px;
    color: #555;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==========================================
   Thank-You Page
   ========================================== */
.thankyou-wrap {
    max-width: 720px;
    margin: 60px auto;
    padding: 30px 20px;
    text-align: center;
}

.thankyou-heading {
    font-size: 45px;
    font-weight: bold;
    color: #2e2e2e;
    margin-bottom: 12px;
}

.thankyou-sub {
    font-size: 18px;
    color: #555;
    margin-bottom: 25px;
}

.go-home-btn {
    display: inline-block;
    background: #2e2e2e;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================
   Combined Quantity + Add-to-Cart Button
   ========================================== */
.custom-cart-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    font-size: 14px;
    height: 36px;
    margin-bottom: 20px;
}

.custom-cart-wrap .custom-cart-qty {
    width: 60px;
    height: 100%;
    text-align: center;
    border: none; /* Inner border removed */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.add-to-custom-cart {
    border-bottom: none;
    background: transparent;
    border-left: 1px solid #ccc;
    color: #2e2e2e;
    font-weight: 600;
    cursor: pointer;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.3s ease;
    border-right: none;
    border-top: none;
}

/* Hover state */
.add-to-custom-cart:hover {
    background: #2e2e2e;
    color: #fff;
}

/* Added state with tick icon */
.add-to-custom-cart.added {
    background: transparent;
    color: #2e2e2e;
    border-left: none;
}

.add-to-custom-cart.added .added-icon {
    font-size: inherit;
    color: #2e2e2e;
}
