/**
 * Checkout Page V2 Styles
 * Added: 2026-01-11
 * 
 * Features:
 * - Glassmorphism card background (like service cards)
 * - Progress Steps with animations
 * - Animated input fields with glow
 * - Pulse/shimmer button effects
 * - Trust Badges
 * - Animated quantity hint arrow
 */

/* ========================================
   GLASSMORPHISM CARD (like service-card-new)
======================================== */

.checkout-card-v2 {
    position: relative;
    /* SOLID dark background - no transparency */
    background: rgb(30, 30, 40) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Prevent ANY color change on hover/focus */
.checkout-card-v2:hover,
.checkout-card-v2:focus-within {
    background: rgb(30, 30, 40) !important;
}

/* Gradient border effect COMPLETELY DISABLED */
.checkout-card-v2::before {
    display: none !important;
    content: none !important;
    background: none !important;
    opacity: 0 !important;
}

.checkout-card-v2:hover::before,
.checkout-card-v2:focus-within::before {
    display: none !important;
    opacity: 0 !important;
}

/* ========================================
   PROGRESS STEPS
======================================== */

.checkout-progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(40, 40, 55, 0.9));
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 120px;
}

.progress-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.progress-step.active .progress-step-icon {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.progress-step.completed .progress-step-icon {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: #4CAF50;
}

.progress-step-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    transition: color 0.3s ease;
}

.progress-step.active .progress-step-text {
    color: #ff6b35;
    font-weight: 600;
}

.progress-step.completed .progress-step-text {
    color: #4CAF50;
}

/* Connector line between steps */
.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 70%;
    width: 60%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.progress-step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, #4CAF50, rgba(255, 255, 255, 0.2));
}

/* ========================================
   DESCRIPTION BLOCK (above form)
======================================== */

.checkout-description-block {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.05));
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-description-block .desc-icon {
    font-size: 20px;
}

.checkout-description-block .desc-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

/* ========================================
   IMPORTANT ALERT (Accent Border)
======================================== */

.checkout-important-alert {
    border-left: 4px solid #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-important-alert .alert-icon {
    font-size: 20px;
    color: #ff6b35;
}

.checkout-important-alert .alert-text {
    color: #ff6b35;
    font-weight: 500;
}

/* ========================================
   INPUT FIELDS WITH ANIMATIONS
======================================== */

.checkout-input-group {
    position: relative;
    margin-bottom: 20px;
}

.checkout-input-group .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 2;
}

.checkout-input-v2 {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.checkout-input-v2:focus {
    outline: none;
    border-color: #ff6b35;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.checkout-input-v2:focus + .input-icon,
.checkout-input-group:focus-within .input-icon {
    color: #ff6b35;
    transform: translateY(-50%) scale(1.2);
}

/* Input label */
.checkout-input-label {
    display: block;
    color: #ff6b35;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.checkout-input-label .required {
    color: #ff5252;
}

/* Validation feedback */
.checkout-input-group .validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
}

.checkout-input-group.valid .validation-icon.success {
    opacity: 1;
    color: #4CAF50;
    animation: validationPop 0.3s ease;
}

.checkout-input-group.invalid .validation-icon.error {
    opacity: 1;
    color: #ff5252;
    animation: validationShake 0.3s ease;
}

@keyframes validationPop {
    0% { transform: translateY(-50%) scale(0); }
    50% { transform: translateY(-50%) scale(1.3); }
    100% { transform: translateY(-50%) scale(1); }
}

@keyframes validationShake {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-50%) translateX(-5px); }
    75% { transform: translateY(-50%) translateX(5px); }
}

/* ========================================
   QUANTITY INPUT WITH HINT
======================================== */

.checkout-quantity-wrapper {
    position: relative;
}

.checkout-quantity-input {
    position: relative;
}

.checkout-quantity-input .pencil-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    z-index: 2;  /* Above input */
    pointer-events: none;  /* Allow click through to input */
}

.checkout-quantity-input input {
    padding-left: 45px;
    padding-right: 120px;
}

.checkout-quantity-input input:focus + .pencil-icon {
    color: #ff6b35;
    transform: translateY(-50%) rotate(-15deg);
}

/* Animated hint arrow */
.quantity-hint {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 2;  /* Above input */
    pointer-events: none;  /* Allow click through to input */
}

.quantity-hint .arrow {
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

/* Pulse border animation */
.checkout-quantity-input input:focus {
    animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1); }
}

/* ========================================
   BUTTONS
======================================== */

.checkout-buttons-v2 {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

/* Pay Now Button - Purple with pulse */
.btn-checkout-pay {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #5a2d82 0%, #3d1a5f 50%, #2d1640 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(90, 45, 130, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(138, 43, 226, 0.6); }
}

.btn-checkout-pay:hover {
    background: linear-gradient(135deg, #6a3d92 0%, #4d2a6f 50%, #3d2650 100%);
    transform: translateY(-2px);
}

/* Add to Cart Button - Orange with shimmer */
.btn-checkout-cart {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    background-size: 200% auto;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-checkout-cart::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.btn-checkout-cart:hover::before {
    left: 150%;
}

.btn-checkout-cart:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* ========================================
   QUANTITY PRESETS BUTTONS
======================================== */

.checkout-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.checkout-preset-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #5a2d82 0%, #3d1a5f 50%, #2d1640 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.checkout-preset-btn:hover {
    background: linear-gradient(135deg, #6a3d92 0%, #4d2a6f 50%, #3d2650 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(90, 45, 130, 0.4);
}

.checkout-preset-btn.active {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* ========================================
   TRUST BADGES
======================================== */

.checkout-trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 20px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.trust-badge .badge-icon {
    font-size: 18px;
}

.trust-badge-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   PRICE DISPLAY
======================================== */

.checkout-price-display {
    margin: 15px 0;
}

.checkout-price-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.checkout-price-value {
    color: #ff6b35;
    font-size: 18px;
    font-weight: 700;
}

.checkout-price-unit {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.checkout-total {
    font-size: 20px;
    font-weight: 700;
}

.checkout-total .total-label {
    color: rgba(255, 255, 255, 0.9);
}

.checkout-total .total-value {
    color: #ff6b35;
}

.checkout-min-notice {
    color: #ff5252;
    font-size: 12px;
    margin-top: 5px;
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .checkout-progress-steps {
        padding: 10px;
        flex-wrap: wrap;
    }
    
    .progress-step {
        max-width: 80px;
    }
    
    .progress-step-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .progress-step-text {
        font-size: 10px;
    }
    
    .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .checkout-buttons-v2 {
        flex-direction: column;
    }
    
    .checkout-trust-badges {
        flex-direction: column;
        gap: 10px;
    }
    
    .trust-badge-separator {
        display: none;
    }
    
    /* Mobile: Show quantity hint arrow - positioned inside input area */
    .quantity-hint {
        display: flex !important;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        gap: 3px;
        z-index: 3;
        color: rgba(255, 255, 255, 0.7);
    }
    
    /* Mobile: Quantity hint text - close to input, left aligned */
    .quantity-hint-text {
        display: block;
        text-align: left;
        font-size: 12px;
        color: #ff6b35;
        margin-top: 4px;
        padding: 0;
    }
    
    .checkout-presets {
        justify-content: center;
    }
    
    /* Mobile-optimized service name in card */
    .checkout-service-name-inline {
        font-size: 14px;
    }
    
    /* Mobile: Better touch targets - FIXED padding for pencil icon */
    .checkout-quantity-input input {
        font-size: 18px;
        padding: 15px 90px 15px 45px;  /* left: space for pencil, right: space for hint */
        min-height: 50px;
    }
    
    /* Mobile: Preset buttons larger for touch */
    .checkout-presets button {
        min-width: 60px;
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* ========================================
   SMART PASTE DETECTION INDICATOR
======================================== */

.social-network-detected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #4CAF50;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.social-network-detected .sn-icon {
    font-size: 16px;
}

/* ========================================
   CHECKBOX STYLING
======================================== */

.checkout-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkout-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #ff6b35;
    cursor: pointer;
    animation: checkboxPulse 2s ease-in-out infinite;
}

.checkout-checkbox:checked {
    animation: none;
    accent-color: #4CAF50;
}

@keyframes checkboxPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.6); 
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2); 
    }
}

.checkout-checkbox-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
}

.checkout-checkbox-label a {
    color: #ff6b35;
    text-decoration: underline;
}

/* ========================================
   SERVICE DESCRIPTION BLOCK (at bottom)
======================================== */

.checkout-service-description {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.checkout-service-description .desc-header {
    color: #ff6b35;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.checkout-service-description .desc-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

/* Quantity hint text below input */
.quantity-hint-text {
    display: block;
    color: #ffa500;
    font-size: 12px;
    margin-top: 5px;
}

/* ========================================
   SERVICE NAME INLINE (above alert)
======================================== */

.checkout-service-name-inline {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-service-name-inline .service-icon-small {
    font-size: 20px;
}

.checkout-service-name-inline .service-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: normal;
}


/* ========================================
   IMPORTANT ALERT V2 (Variant C - Icon in bar)
======================================== */

.checkout-important-alert-v2 {
    display: flex;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.checkout-important-alert-v2 .alert-icon-bar {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    min-width: 45px;
}

.checkout-important-alert-v2 .alert-text {
    background: rgba(255, 107, 53, 0.1);
    padding: 12px 15px;
    color: #ff6b35;
    font-weight: 500;
    font-size: 13px;
    flex: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Mobile: allow text wrap if needed */
@media (max-width: 400px) {
    .checkout-important-alert-v2 .alert-text {
        white-space: normal;
        font-size: 12px;
    }
}
