/**
 * Campaigning Tool WhatsApp Login - Frontend Styles
 */

.ct-wal-container {
    max-width: 420px;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1f2937;
    box-sizing: border-box;
}

.ct-wal-container * {
    box-sizing: border-box;
}

/* Compact Theme (Used in WooCommerce / WP Login inline) */
.ct-wal-container.ct-wal-theme-compact {
    max-width: 100%;
    margin: 10px 0;
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    background: #fbfcfd;
}

/* Header */
.ct-wal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.ct-wal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #eafaf1;
    border-radius: 50%;
    flex-shrink: 0;
}

.ct-wal-title-group {
    flex: 1;
}

.ct-wal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #075E54;
    line-height: 1.3;
}

.ct-wal-subtitle {
    margin: 3px 0 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Divider for Integrations */
.ct-wal-integration-wrap {
    margin: 20px 0;
    width: 100%;
}

.ct-wal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
}

.ct-wal-divider::before,
.ct-wal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.ct-wal-divider span {
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Form Fields */
.ct-wal-field-group {
    margin-bottom: 18px;
}

.ct-wal-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ct-wal-input-phone-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.ct-wal-input-phone-wrap:focus-within {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}

.ct-wal-country-prefix {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #075E54;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    user-select: none;
}

.ct-wal-phone-input {
    width: 100%;
    border: none !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    letter-spacing: 0.5px;
    color: #111827;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.ct-wal-hint {
    display: block;
    font-size: 11.5px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Button */
.ct-wal-btn {
    width: 100%;
    padding: 12px 16px;
    background: #25D366;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    line-height: 1.2;
}

.ct-wal-btn:hover {
    background: #20bd5a;
    color: #ffffff !important;
}

.ct-wal-btn:active {
    transform: scale(0.99);
}

.ct-wal-btn:disabled {
    background: #94d3a8 !important;
    cursor: not-allowed;
    transform: none;
}

.ct-wal-btn-verify {
    background: #128C7E;
}

.ct-wal-btn-verify:hover {
    background: #0d7367;
}

/* OTP Boxes (6 individual digit inputs) */
.ct-wal-sent-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.ct-wal-change-phone {
    font-size: 12px;
    font-weight: 600;
    color: #075E54;
    text-decoration: underline;
    cursor: pointer;
}

.ct-wal-change-phone:hover {
    color: #25D366;
}

.ct-wal-otp-boxes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 18px;
}

.ct-wal-otp-digit {
    width: 44px;
    height: 50px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    background: #ffffff;
    transition: all 0.15s ease-in-out;
    outline: none;
    box-shadow: none;
    padding: 0;
}

.ct-wal-otp-digit:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
    transform: translateY(-2px);
}

/* Resend Countdown */
.ct-wal-resend-wrap {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #6b7280;
}

.ct-wal-resend-link {
    font-weight: 600;
    color: #075E54;
    text-decoration: none;
    cursor: pointer;
}

.ct-wal-resend-link:hover {
    text-decoration: underline;
    color: #25D366;
}

/* Feedback Messages */
.ct-wal-message {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.ct-wal-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ct-wal-message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Logged-In Notice */
.ct-wal-already-logged-in {
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    text-align: center;
}

/* Spinner */
.ct-wal-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: ct-wal-spin 0.8s linear infinite;
}

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

@media (max-width: 480px) {
    .ct-wal-otp-digit {
        width: 38px;
        height: 44px;
        font-size: 18px;
    }
}

