/**
 * Shop Notifications & Cart Badge
 * Modern toast notifications and cart counter
 * Updated: Bottom-right position untuk tidak menutupi header
 */

/* ========================================
   Toast Notifications - Bottom Right Position
   ======================================== */

.jz-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    min-width: 340px;
    max-width: 420px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.jz-toast--show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.jz-toast__content {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.jz-toast--success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 
        0 10px 30px rgba(17, 153, 142, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.jz-toast--error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 
        0 10px 30px rgba(235, 51, 73, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.jz-toast--info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 
        0 10px 30px rgba(79, 172, 254, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.jz-toast--success .jz-toast__content::before {
    content: '';
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.24);
}

.jz-toast--success .jz-toast__content::after {
    content: '✓';
    position: absolute;
    left: 38px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.jz-toast--error .jz-toast__content::before {
    content: '';
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.24);
}

.jz-toast--error .jz-toast__content::after {
    content: '!';
    position: absolute;
    left: 44px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

/* Override parent theme menu button positioning for cart icon */
.jz-header .head .jzv2-menu-btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 3;
}

.jz-header .head .primary {
    order: 1;
}

/* ========================================
   Cart Badge in Header
   ======================================== */

.jz-header .head {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.jz-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)) padding-box,
                linear-gradient(135deg, #FF6B35 0%, #FF8C42 50%, #FFA500 100%) border-box;
    border: 2px solid transparent;
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    white-space: nowrap;
    z-index: 10069;
    order: 2;
    box-shadow: inset 0 0 15px rgba(255, 107, 53, 0.15);
}

.jz-cart-link:hover {
    background: linear-gradient(rgba(255, 107, 53, 0.12), rgba(255, 107, 53, 0.12)) padding-box,
                linear-gradient(135deg, #FFA500 0%, #FF8C42 50%, #FF6B35 100%) border-box;
    box-shadow: inset 0 0 20px rgba(255, 107, 53, 0.25), 0 0 20px rgba(255, 107, 53, 0.3);
    transform: scale(1.05);
}

.jz-cart-link:active {
    background: linear-gradient(rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.2)) padding-box,
                linear-gradient(135deg, #FF6B35 0%, #FF8C42 50%, #FFA500 100%) border-box;
    transform: scale(0.98);
}

.jz-cart-link svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
    flex-shrink: 0;
}

/* ========================================
   Mobile Responsive - Cart Icon
   ======================================== */

@media (max-width: 768px) {
    .jz-cart-link {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .jz-cart-link svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   Checkout Login Required Page
   ======================================== */

.jz-checkout-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-required-hero {
    position: relative;
    padding: 60px 20px;
    margin-bottom: 40px;
    overflow: hidden;
}

.login-required-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
}

.login-required-hero__gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.15), transparent 50%);
}

.login-required-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-required-hero__content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.login-required-hero__content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.login-required-content {
    flex: 1;
    padding: 40px 20px;
}

.login-required-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto 40px;
    align-items: center;
}

.login-required-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)) padding-box,
                linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 152, 0, 0.1)) border-box;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.login-required-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.login-required-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.login-required-divider {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FFA500 100%);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.back-to-cart {
    text-align: center;
}

.back-to-cart .btn-secondary {
    display: inline-block;
    width: auto;
    min-width: 200px;
}

/* ========================================
   Registration Form
   ======================================== */

.jz-register-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-group input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.2);
}

.form-group input:disabled {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.form-help {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    display: none;
}

.form-help.error {
    color: #ff6b6b;
    display: block;
}

.form-help.success {
    color: #51cf66;
    display: block;
}

.register-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.register-message.error {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    display: block;
}

.register-message.success {
    background: rgba(81, 207, 102, 0.2);
    border: 1px solid rgba(81, 207, 102, 0.4);
    color: #51cf66;
    display: block;
}

.register-message.loading {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #ffa500;
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .login-required-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .login-required-divider {
        display: none;
    }

    .login-required-hero__content h1 {
        font-size: 24px;
    }

    .login-required-card {
        padding: 24px 16px;
    }

    .login-required-card h2 {
        font-size: 18px;
    }
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(245, 158, 11, 0.4),
        0 0 0 3px #0b1220;
    animation: cartBadgePulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cartBadgePulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    .jz-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 16px 18px;
    }
    
    .jz-toast__content {
        font-size: 14px;
    }
    
    .jz-toast--success .jz-toast__content::before,
    .jz-toast--error .jz-toast__content::before {
        width: 36px;
        height: 36px;
    }
    
    .jz-toast--success .jz-toast__content::after {
        left: 31px;
        font-size: 20px;
    }
    
    .jz-toast--error .jz-toast__content::after {
        left: 36px;
        font-size: 20px;
    }
    
    .jz-cart-link {
        padding: 8px 10px;
        margin-right: 8px;
        gap: 4px;
    }
    
    .jz-cart-link span {
        display: none;
    }
    
    .jz-cart-link svg {
        width: 20px;
        height: 20px;
    }
}
