/* InstaCOD - Multi-Template Order Form Styles v5.0 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&family=Cairo:wght@400;500;600;700&display=swap');

/* ==================== TEMPLATE: MODERN (Default) ==================== */
:root,
.template-modern {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #1e293b;
    --text-medium: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --header-gradient: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

/* ==================== TEMPLATE: CLASSIC ==================== */
.template-classic {
    --primary: #b83375;
    --primary-dark: #9c2a62;
    --primary-light: #d64d8f;
    --secondary: #b83375;
    --accent: #b83375;
    --success: #28a745;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --border: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --radius: 25px;
    --radius-lg: 15px;
    --radius-full: 25px;
    --font-family: 'Cairo', sans-serif;
    --gradient: linear-gradient(135deg, #b83375 0%, #9c2a62 100%);
    --header-gradient: #b83375;
}

/* ==================== TEMPLATE: STARTER ==================== */
.template-starter {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #10b981;
    --accent: #10b981;
    --success: #10b981;
    --bg-light: #ffffff;
    --bg-card: #ffffff;
    --text-dark: #374151;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --border: #d1d5db;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 8px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: #10b981;
    --header-gradient: #10b981;
}

/* ==================== TEMPLATE: DARK ==================== */
.template-dark {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --secondary: #ef4444;
    --accent: #f59e0b;
    --success: #10b981;
    --bg-light: #334155;
    --bg-card: #1e293b;
    --text-dark: #f8fafc;
    --text-medium: #cbd5e1;
    --text-light: #94a3b8;
    --border: #475569;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --header-gradient: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ==================== TEMPLATE: ELEGANT ==================== */
.template-elegant {
    --primary: #0f766e;
    --primary-dark: #0d9488;
    --primary-light: #14b8a6;
    --secondary: #0891b2;
    --accent: #06b6d4;
    --success: #10b981;
    --bg-light: #f0fdfa;
    --bg-card: #ffffff;
    --text-dark: #134e4a;
    --text-medium: #5eead4;
    --text-light: #99f6e4;
    --border: #ccfbf1;
    --shadow: 0 10px 40px rgba(15, 118, 110, 0.12);
    --shadow-sm: 0 4px 20px rgba(15, 118, 110, 0.08);
    --radius: 20px;
    --radius-lg: 28px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #0f766e 0%, #0891b2 100%);
    --header-gradient: linear-gradient(90deg, #0f766e, #14b8a6, #06b6d4);
}

/* ==================== TEMPLATE: LUXURY ==================== */
.template-luxury {
    --primary: #b8860b;
    --primary-dark: #996f0a;
    --primary-light: #daa520;
    --secondary: #8b4513;
    --accent: #cd853f;
    --success: #228b22;
    --bg-light: #faf8f5;
    --bg-card: #fffef9;
    --text-dark: #2c1810;
    --text-medium: #6b5344;
    --text-light: #a08679;
    --border: #e8ddd4;
    --shadow: 0 10px 40px rgba(184, 134, 11, 0.15);
    --shadow-sm: 0 4px 20px rgba(184, 134, 11, 0.08);
    --radius: 4px;
    --radius-lg: 8px;
    --radius-full: 4px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #cd853f 100%);
    --header-gradient: linear-gradient(90deg, #b8860b, #daa520, #cd853f);
}

/* ==================== TEMPLATE: NEON ==================== */
.template-neon {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #06b6d4;
    --accent: #f472b6;
    --success: #22c55e;
    --bg-light: #1a1a2e;
    --bg-card: #16213e;
    --text-dark: #eef2ff;
    --text-medium: #c7d2fe;
    --text-light: #a5b4fc;
    --border: #312e81;
    --shadow: 0 10px 40px rgba(139, 92, 246, 0.25);
    --shadow-sm: 0 4px 20px rgba(139, 92, 246, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #f472b6 100%);
    --header-gradient: linear-gradient(90deg, #8b5cf6, #06b6d4, #f472b6);
}

/* ==================== TEMPLATE: MINIMAL ==================== */
.template-minimal {
    --primary: #18181b;
    --primary-dark: #09090b;
    --primary-light: #3f3f46;
    --secondary: #18181b;
    --accent: #18181b;
    --success: #22c55e;
    --bg-light: #fafafa;
    --bg-card: #ffffff;
    --text-dark: #18181b;
    --text-medium: #71717a;
    --text-light: #a1a1aa;
    --border: #e4e4e7;
    --shadow: none;
    --shadow-sm: none;
    --radius: 0px;
    --radius-lg: 0px;
    --radius-full: 0px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: #18181b;
    --header-gradient: #18181b;
}

/* ==================== TEMPLATE: OCEAN ==================== */
.template-ocean {
    --primary: #0077b6;
    --primary-dark: #023e8a;
    --primary-light: #0096c7;
    --secondary: #00b4d8;
    --accent: #48cae4;
    --success: #06d6a0;
    --bg-light: #caf0f8;
    --bg-card: #ffffff;
    --text-dark: #03045e;
    --text-medium: #0077b6;
    --text-light: #90e0ef;
    --border: #ade8f4;
    --shadow: 0 10px 40px rgba(0, 119, 182, 0.15);
    --shadow-sm: 0 4px 20px rgba(0, 119, 182, 0.1);
    --radius: 20px;
    --radius-lg: 30px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #48cae4 100%);
    --header-gradient: linear-gradient(90deg, #023e8a, #0077b6, #00b4d8, #48cae4);
}

/* ==================== TEMPLATE: SUNSET ==================== */
.template-sunset {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --secondary: #ec4899;
    --accent: #f43f5e;
    --success: #22c55e;
    --bg-light: #fff7ed;
    --bg-card: #ffffff;
    --text-dark: #431407;
    --text-medium: #9a3412;
    --text-light: #fdba74;
    --border: #fed7aa;
    --shadow: 0 10px 40px rgba(249, 115, 22, 0.2);
    --shadow-sm: 0 4px 20px rgba(249, 115, 22, 0.12);
    --radius: 24px;
    --radius-lg: 32px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #f43f5e 100%);
    --header-gradient: linear-gradient(90deg, #f97316, #f59e0b, #ec4899, #f43f5e);
}

/* ==================== TEMPLATE: FOREST ==================== */
.template-forest {
    --primary: #166534;
    --primary-dark: #14532d;
    --primary-light: #22c55e;
    --secondary: #65a30d;
    --accent: #84cc16;
    --success: #22c55e;
    --bg-light: #f0fdf4;
    --bg-card: #ffffff;
    --text-dark: #14532d;
    --text-medium: #166534;
    --text-light: #86efac;
    --border: #bbf7d0;
    --shadow: 0 10px 40px rgba(22, 101, 52, 0.12);
    --shadow-sm: 0 4px 20px rgba(22, 101, 52, 0.08);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --font-family: 'Tajawal', sans-serif;
    --gradient: linear-gradient(135deg, #166534 0%, #22c55e 50%, #84cc16 100%);
    --header-gradient: linear-gradient(90deg, #14532d, #166534, #22c55e, #84cc16);
}

/* Hide default WooCommerce cart */
.single-product form.cart {
    display: none !important;
}

/* Main Form Container */
.instacod_instant_order {
    font-family: 'Tajawal', sans-serif;
    max-width: 100%;
    margin: 30px 0;
    direction: rtl;
}

/* Form Box - Glass Morphism Style */
.instacod_instant_order_form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Decorative gradient */
.instacod_instant_order_form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

/* Form Title */
.instacod_information_title {
    grid-column: 1 / -1;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    padding-bottom: 16px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.instacod_information_title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* Field Groups */
.instacod_field_group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.instacod_field_group.instacod_full_width {
    grid-column: 1 / -1;
}

/* Labels - Modern Style */
.instacod_label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
    font-family: 'Tajawal', sans-serif;
    padding-right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.instacod_label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Input Wrapper */
.instacod_input_wrapper {
    position: relative;
    display: flex;
    align-items: center;
    direction: rtl;
}

.instacod_input_wrapper i {
    position: absolute;
    right: 18px;
    color: var(--primary);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Modern Inputs */
.instacod_input_wrapper input,
.instacod_input_wrapper select {
    width: 100% !important;
    height: 54px !important;
    padding: 0 50px 0 18px !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 16px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    line-height: 50px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: var(--bg-light) !important;
    outline: none !important;
    text-align: right !important;
    direction: rtl;
    color: var(--text-dark) !important;
    box-sizing: border-box !important;
}

.instacod_input_wrapper input::placeholder {
    color: var(--text-light) !important;
    font-weight: 400 !important;
}

.instacod_input_wrapper input:hover,
.instacod_input_wrapper select:hover {
    border-color: var(--primary-light) !important;
    background: #fff !important;
}

.instacod_input_wrapper input:focus,
.instacod_input_wrapper select:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

.instacod_input_wrapper input:focus + i,
.instacod_input_wrapper:focus-within i {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* ==================== STATE & CITY DROPDOWN ==================== */

.instacod_state_wrapper {
    position: relative;
    display: flex;
    align-items: center;
    direction: rtl;
}

.instacod_state_wrapper i {
    position: absolute;
    right: 18px;
    color: var(--primary);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.instacod_state_dropdown,
.instacod_city_dropdown,
select#instacod_state,
select#instacod_city,
select[name="instacod_state"],
select[name="instacod_city"] {
    width: 100% !important;
    height: 54px !important;
    padding: 0 50px 0 40px !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 16px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    line-height: 50px !important;
    background: var(--bg-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 16px center !important;
    background-size: 16px !important;
    color: var(--text-dark) !important;
    text-align: right !important;
    direction: rtl !important;
    cursor: pointer !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
}

.instacod_state_dropdown:hover,
.instacod_city_dropdown:hover,
select#instacod_state:hover,
select#instacod_city:hover {
    border-color: var(--primary-light) !important;
    background-color: #fff !important;
}

.instacod_state_dropdown:focus,
.instacod_city_dropdown:focus,
select#instacod_state:focus,
select#instacod_city:focus {
    border-color: var(--primary) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

.instacod_state_dropdown option,
.instacod_city_dropdown option,
select#instacod_state option,
select#instacod_city option {
    padding: 12px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 14px !important;
    background: #fff !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

/* ==================== END DROPDOWNS ==================== */

.instacod_full_width {
    grid-column: 1 / -1;
}

/* Textarea */
.instacod_instant_order_form > textarea {
    grid-column: 1 / -1;
    width: 100% !important;
    min-height: 100px;
    padding: 16px !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 16px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    background: var(--bg-light) !important;
    outline: none !important;
    text-align: right !important;
    direction: rtl;
    resize: vertical;
    color: var(--text-dark) !important;
}

.instacod_instant_order_form > textarea:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

/* Placeholder */
.instacod_placeholder {
    display: none;
}

/* ==================== QUANTITY ==================== */

.instacod_quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 8px 12px;
    border: 2px solid var(--border);
}

.instacod_quantity > input[type="number"] {
    width: 60px !important;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    border: none !important;
    background: transparent !important;
    color: var(--text-dark);
    font-family: 'Tajawal', sans-serif;
}

.instacod_plus,
.instacod_minus {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    transition: all 0.3s ease;
}

.instacod_plus:hover,
.instacod_minus:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ==================== CHECKOUT BUTTON ==================== */

.instacod_checkout {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px !important;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    border: none;
    border-radius: var(--radius-full) !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.instacod_checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.instacod_checkout:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.instacod_checkout:hover::before {
    left: 100%;
}

.instacod_checkout:active {
    transform: translateY(-1px);
}

.instacod_checkout.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* ==================== ORDER SUMMARY ==================== */

.instacod_order_summary {
    margin-top: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.instacod_order_summary_head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 100%);
}

.instacod_order_summary_head:hover {
    background: var(--bg-light);
}

.instacod_order_summary_title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
}

.instacod_order_summary_title i {
    color: var(--primary);
    font-size: 20px;
}

.instacod_order_summary_title .fa-chevron-down {
    margin-right: auto;
    transition: transform 0.3s ease;
    font-size: 14px;
    color: var(--text-medium);
}

.instacod_order_summary.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Price Table */
.instacod_price_table {
    display: none;
    background: #fff;
    position: relative;
}

.instacod_order_summary.active .instacod_price_table {
    display: block;
}

.instacod_price_table > table {
    width: 100%;
    border-collapse: collapse;
}

.instacod_price_table > table tr {
    border-bottom: 1px solid var(--border);
}

.instacod_price_table > table td {
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 500;
}

.instacod_price_table > table td:first-child {
    text-align: right;
    color: var(--text-dark);
    font-weight: 600;
}

.instacod_price_table > table td:last-child {
    text-align: left;
    color: var(--text-medium);
}

.instacod_row_total_price > td {
    font-weight: 800 !important;
    font-size: 17px !important;
    color: var(--primary) !important;
}

.instacod_row_total_price {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

/* Order Qty Badge */
span.instacod_order_qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    background: var(--primary);
    color: #fff;
}

/* Free Shipping Badge */
span.instacod_free_shipping {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #fff;
}

/* ==================== VARIATIONS ==================== */

.instacod_variations {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.instacod_variations > li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.variation_title {
    position: relative;
    width: 100%;
}

.variation_title input {
    display: none;
}

.variation_title input + label {
    display: flex;
    align-items: center;
    padding: 14px 18px 14px 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-light);
}

.variation_title input + label:hover {
    border-color: var(--primary-light);
    background: #fff;
}

.variation_title input:checked + label {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.variation_title input + label::before {
    content: "";
    width: 22px;
    height: 22px;
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--border);
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.variation_title input + label::after {
    content: "";
    position: absolute;
    left: 20px;
    width: 10px;
    height: 10px;
    top: 50%;
    border-radius: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.variation_title input:checked + label::before {
    border-color: var(--primary);
}

.variation_title input:checked + label::after {
    opacity: 1;
}

.variation_price {
    font-weight: 700;
    margin-left: 12px;
    color: var(--primary);
}

.regular_price {
    text-decoration: line-through;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 6px;
}

/* Modern UI Variations */
ul.instacod_variations.modern_ui {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.attribute_modern_ui {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.attribute_modern_ui > h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 80px;
    margin: 0;
}

.attribute_inner > input {
    display: none;
}

.attribute_inner > label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.attribute_inner > label:hover {
    border-color: var(--primary-light);
    background: #fff;
}

.attribute_inner > input:checked + label {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.attribute_inner.attr_color > label {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    box-shadow: inset 0 0 0 3px #fff;
}

.instacod_variations.modern_ui .variation_selection {
    display: none;
}

/* ==================== STICKY FOOTER ==================== */

.instacod_sticky_footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    border-top: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
}

.instacod_buy_now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    border-radius: var(--radius-full);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff !important;
    box-shadow: none;
}

.instacod_buy_now:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.instacod_footer_icons {
    display: none;
    gap: 10px;
}

.instacod_footer_icons a {
    text-decoration: none !important;
}

.instacod_footer_icons i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 20px;
    color: var(--text-medium);
    transition: all 0.3s ease;
    background: #fff;
}

.instacod_footer_icons i:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ==================== LOADER ==================== */

.instacod_btn_loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}

.instacod_checkout.loading .instacod_btn_loader {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.order_loader_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.instacod_order_loader {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==================== NOTICE ==================== */

.instacod_notice {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #fca5a5;
}

.instacod_notice::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
}

.instacod_notice.hidden {
    display: none;
}

/* ==================== DISABLED STATES ==================== */

.instacod_disabled,
.ip_block,
.cookie_block {
    position: relative;
    pointer-events: none;
}

.instacod_disabled::after,
.ip_block::after,
.cookie_block::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 100;
    backdrop-filter: blur(2px);
}

.form-hide-for-desktop {
    display: none !important;
}

.instacod_coupon_discount_row {
    display: none;
}

.instacod_hidden {
    display: none !important;
}

.disabled-btn {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

#instacod_fixed_shipping_fe {
    display: none;
}

/* ==================== OTP SECTION ==================== */

.instacod_otp_section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 16px;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15);
    position: relative;
    overflow: hidden;
}

.instacod_otp_section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 0 0 0 100%;
    opacity: 0.1;
}

.instacod_otp_header {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px dashed #bbf7d0;
}

.instacod_otp_header i {
    font-size: 32px;
    color: #25d366;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.instacod_otp_actions {
    display: flex;
    gap: 12px;
}

.instacod_otp_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.instacod_otp_send_btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.instacod_otp_send_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
}

.instacod_otp_send_btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.instacod_otp_code_wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #bbf7d0;
}

.instacod_otp_code_label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
    text-align: center;
}

.instacod_otp_input_group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: white;
    padding: 10px;
    border-radius: var(--radius);
    border: 3px solid #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.12);
}

.instacod_otp_input {
    flex: 1;
    padding: 16px 20px !important;
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    text-align: center !important;
    letter-spacing: 12px !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    color: #166534 !important;
    transition: all 0.3s ease !important;
}

.instacod_otp_input:focus {
    outline: none !important;
    background: white !important;
    box-shadow: inset 0 0 0 2px #22c55e !important;
}

.instacod_otp_timer {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    min-width: 75px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.instacod_otp_verify_btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.instacod_otp_verify_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45);
}

.instacod_otp_verify_btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#instacod_otp_message {
    margin-bottom: 16px;
}

#instacod_otp_message .otp-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #86efac;
}

#instacod_otp_message .otp-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #fca5a5;
}

.instacod_otp_verified {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    padding: 16px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    margin-top: 16px;
    border: 2px solid #86efac;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.instacod_otp_verified i {
    font-size: 24px;
    color: #22c55e;
}

.instacod_otp_help {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 14px;
}

.instacod_otp_help i {
    color: #22c55e;
}

/* ==================== COUPON ==================== */

.coupon-field {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.custom-coupon {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.custom-coupon label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

#coupon_code {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

#coupon_code:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

#apply_coupon {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary);
    color: #fff;
}

#apply_coupon:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .instacod_instant_order_form {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 16px;
    }
    
    .instacod_information_title {
        font-size: 20px;
    }
    
    .instacod_checkout {
        padding: 16px 24px !important;
        font-size: 16px;
    }
    
    .instacod_footer_icons {
        display: flex;
    }
    
    .instacod_sticky_footer {
        display: flex;
        padding: 12px 16px;
    }
    
    .instacod_buy_now {
        flex: 1;
        text-align: center;
        padding: 12px 24px;
    }
    
    .coupon-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-coupon {
        flex-direction: column;
        align-items: stretch;
    }
    
    #coupon_code {
        width: 100%;
    }
    
    .instacod_otp_input {
        font-size: 22px !important;
        letter-spacing: 8px !important;
    }
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instacod_instant_order {
    animation: fadeInUp 0.5s ease;
}

.instacod_field_group {
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.instacod_field_group:nth-child(1) { animation-delay: 0.1s; }
.instacod_field_group:nth-child(2) { animation-delay: 0.15s; }
.instacod_field_group:nth-child(3) { animation-delay: 0.2s; }
.instacod_field_group:nth-child(4) { animation-delay: 0.25s; }
.instacod_field_group:nth-child(5) { animation-delay: 0.3s; }
.instacod_field_group:nth-child(6) { animation-delay: 0.35s; }
