/* ============================================
         MODAL DARK YELLOW THEME
         Elegan, minimalis, tidak lebay
         Font: Public Sans & Plus Jakarta Sans
    ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Base font settings */
.modal-container,
.modal-container *,
.loading-content,
.loading-content *,
.toast-notification,
.toast-notification * {
    font-family: 'Plus Jakarta Sans', 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Specific font assignments */
.modal-title,
.modal-btn,
.loading-title {
    font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
    font-weight: 500;
}

.form-label,
.summary-title,
.summary-item,
.summary-total,
.loading-subtitle,
.toast-notification,
.error-message,
.wa-hint {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
}

.form-input {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.modal-btn-submit,
.modal-btn-cancel {
    font-family: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
    font-weight: 500;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 18, 18, 0.49);
    backdrop-filter: blur(5px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.modal-container {
    position: relative;
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.8rem;
    background-color: white;
    border-radius: 20px;
    border: 1px solid #f5c542;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-container.active {
    transform: translateY(0);
    opacity: 1;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: black;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-title i {
    color: #f5c542;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: #808080;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #2a2a2a;
    color: #f5c542;
}

/* Modal Body */
.modal-body {
    margin-bottom: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: black;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: white;
    border: 2px solid #ededed;
    border-radius: 12px;
    color: #e3e3e3;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #f5c542;
    background-color: #fff5d9;
}

.form-input.error {
    border-color: #cf6679;
}

.form-input::placeholder {
    color: #ababab;
}

/* Error Message */
.error-message {
    color: #cf6679;
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 400;
    display: none;
}

.error-message.show {
    display: block;
}

/* WhatsApp Hint */
.wa-hint {
    font-size: 0.75rem;
    color: #6b6b6b;
    margin-top: 6px;
}

/* Product Summary */
.product-summary {
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 100, 255, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(0, 150, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(50, 150, 255, 0.1) 0%, transparent 35%),
        radial-gradient(circle at 90% 20%, rgba(0, 200, 255, 0.12) 0%, transparent 45%),
        #1a1f2e;
    padding: 18px;
    border-radius: 16px;
    margin-top: 24px;
    border: 1px solid rgba(0, 150, 255, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 100, 255, 0.2);
    transition: all 0.3s ease;
}

.product-summary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.product-summary:hover {
    box-shadow: 0 20px 40px -5px rgba(0, 150, 255, 0.3);
    border-color: rgba(0, 200, 255, 0.4);
}

.product-summary:hover::before {
    left: 100%;
}



@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Tambahan efek shimmer untuk background biru */
@keyframes shimmerMove {
    0% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.1; }
}

/* Opsi kedua dengan efek particle (opsional) */
.product-summary.particle-effect {
    background: #1a1f2e;
    position: relative;
}

.product-summary.particle-effect .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00aaff;
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 4s ease infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.4; }
}

.summary-title {
    margin-top: 0;
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.summary-price {
    font-weight: 400;
    color: #ffffff;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    border-top: 1px solid #2a2a2a;
    padding-top: 16px;
    margin-top: 8px;
    color: #ffffff;
    font-size: 1rem;
}

.summary-total span:last-child {
    color: #ffd700;
    font-weight: 500;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

/* Modal Buttons */
.modal-btn {
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.modal-btn-cancel {
    background-color: #242424;
    color: #ffffff;
}


.modal-btn-submit {
    background-color: #ffd700;
    color: #1a1a1a;
    font-weight: 500;
}

.modal-btn-submit:hover {
    background-color: #ffd966;
    transform: translateY(-1px);
}

.modal-btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background-color: #4f4f4f;
    color: #808080;
}

/* ============================================
         LOADING OVERLAY STYLES (DARK YELLOW)
    ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.loading-overlay.active {
    display: block;
    opacity: 1;
}

.loading-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #2a2a2a;
    padding: 32px;
    text-align: center;
    z-index: 9999;
    min-width: 280px;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.loading-content.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 44px;
    height: 44px;
    border: 2px solid #2a2a2a;
    border-radius: 50%;
    border-top-color: #f5c542;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}

.loading-title {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-subtitle {
    color: #6b6b6b;
    font-size: 0.9rem;
    margin: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
         TOAST NOTIFICATION STYLES (DARK YELLOW)
    ============================================ */

.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 16px;
    border-left: 3px solid #f5c542;
    border-top: 1px solid #2a2a2a;
    border-right: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.25s ease;
    font-weight: 400;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification i {
    font-size: 1.2rem;
    color: #f5c542;
}

.toast-notification.toast-success {
    border-left-color: #4caf92;
}

.toast-notification.toast-success i {
    color: #4caf92;
}

.toast-notification.toast-error {
    border-left-color: #cf6679;
}

.toast-notification.toast-error i {
    color: #cf6679;
}

.toast-notification.toast-info {
    border-left-color: #f5c542;
}

.toast-notification.toast-info i {
    color: #f5c542;
}

/* ============================================
         RESPONSIVE STYLES FOR 480px
    ============================================ */

@media (max-width: 480px) {
    /* Modal Container */
    .modal-container {
        width: 92%;
        padding: 1.4rem;
        border-radius: 18px;
    }
    
    /* Modal Header */
    .modal-header {
        display:none;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }
    
    .modal-title {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .modal-title i {
        font-size: 1rem;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    /* Form Styles */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .error-message {
        font-size: 0.7rem;
        margin-top: 4px;
    }
    
    .wa-hint {
        font-size: 0.7rem;
    }
    
    /* Product Summary */
    .product-summary {
        padding: 14px;
        border-radius: 14px;
        margin-top: 18px;
    }
    
    .summary-title {
        font-size: 0.76rem;
        margin-bottom: 12px;
    }
    
    .summary-item {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    .summary-nama {flex:2;}
    
    .summary-total {
        flex:1;
        padding-top: 12px;
        font-size: 0.9rem;
    }
    
    /* Modal Footer */
    .modal-footer {
        gap: 10px;
        padding-top: 14px;
    }
    
    .modal-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        border-radius: 30px;
    }
    
    /* Loading Overlay */
    .loading-content {
        min-width: 240px;
        padding: 24px;
        border-radius: 18px;
    }
    
    .loading-spinner {
        width: 38px;
        height: 38px;
        border-width: 2px;
        margin-bottom: 14px;
    }
    
    .loading-title {
        font-size: 1rem;
    }
    
    .loading-subtitle {
        font-size: 0.8rem;
    }
    
    /* Toast Notification */
    .toast-notification {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        padding: 12px 16px;
        font-size: 0.85rem;
        border-radius: 14px;
    }
    
    .toast-notification i {
        font-size: 1rem;
    }
}

/* Small devices (360px) */
@media (max-width: 360px) {
    .modal-container {
        padding: 1.2rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .form-input {
        padding: 9px 12px;
        font-size: 0.85rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px;
    }
}