/**
 * WhatsApp 360 Suite - Public Styles
 */

/* ===== OTP Login Form ===== */
.w360-otp-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.w360-otp-form-container h3 {
    text-align: center;
    margin: 0 0 8px;
    font-size: 20px;
    color: #1e293b;
}

.w360-otp-form-container > p {
    text-align: center;
    color: #64748b;
    margin: 0 0 24px;
    font-size: 14px;
}

.w360-otp-step {
    display: none;
}

.w360-otp-step.active {
    display: block;
}

.w360-form-group {
    margin-bottom: 16px;
}

.w360-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.w360-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.w360-form-group input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.w360-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.w360-btn:hover {
    background: #1da851;
}

.w360-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.w360-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    margin-top: 8px;
}

.w360-btn-secondary:hover {
    background: #e2e8f0;
}

.w360-otp-timer {
    text-align: center;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
}

.w360-otp-message {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
}

.w360-otp-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.w360-otp-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.w360-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #94a3b8;
    font-size: 13px;
}

.w360-divider::before,
.w360-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ===== Chat Widget ===== */
.w360-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

.w360-chat-widget.left {
    right: auto;
    left: 20px;
}

.w360-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.w360-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.w360-chat-popup {
    display: none;
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    flex-direction: column;
}

.w360-chat-widget.left .w360-chat-popup {
    right: auto;
    left: 0;
}

.w360-chat-popup.open {
    display: flex;
}

.w360-chat-popup-header {
    padding: 16px;
    background: #25D366;
    color: #fff;
}

.w360-chat-popup-header h4 {
    margin: 0;
    font-size: 16px;
}

.w360-chat-popup-header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.w360-chat-popup-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.w360-chat-popup-greeting {
    background: #f0fdf4;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 16px;
    align-self: flex-start;
}

.w360-chat-popup-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.w360-chat-popup-footer a {
    display: block;
    padding: 10px;
    background: #25D366;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.w360-chat-popup-footer a:hover {
    background: #1da851;
}

/* ===== Checkout Opt-in ===== */
.w360-whatsapp-optin {
    margin: 12px 0;
}

.w360-whatsapp-optin label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.w360-whatsapp-optin input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #25D366;
}

/* ===== Responsive ===== */
@media screen and (max-width: 480px) {
    .w360-otp-form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .w360-chat-popup {
        width: calc(100vw - 40px);
        height: 400px;
    }
    
    .w360-chat-widget {
        bottom: 10px;
        right: 10px;
    }
}
