/* ChWhatsAppButton Module Styles - Professional Design */

:root {
    --wa-green: #25D366;
    --wa-green-hover: #128C7E;
    --wa-bg-light: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --accent-blue: #3182ce;
}

/* Modal Overlay */
.chwhatsapp-modal {
    display: none;
    position: fixed;
    z-index: 10001; /* Above almost everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal Content Container */
.chwhatsapp-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    animation: chwa-fade-in 0.3s ease-out;
}

@keyframes chwa-fade-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.chwhatsapp-modal-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chwhatsapp-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.chwhatsapp-modal-header h2 i {
    color: var(--wa-green);
    margin-right: 10px;
}

.chwhatsapp-close {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.chwhatsapp-close:hover {
    color: #ef4444;
}

/* Body */
.chwhatsapp-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.chwhatsapp-info-box {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
}

.chwhatsapp-info-box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.chwhatsapp-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.chwhatsapp-section-title i {
    margin-right: 8px;
    opacity: 0.7;
}

/* Template Items */
.chwhatsapp-templates {
    margin-bottom: 24px;
}

.chwhatsapp-template-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chwhatsapp-template-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chwhatsapp-template-item h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--text-main);
}

.chwhatsapp-template-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.03);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.chwhatsapp-template-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.chwa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    gap: 6px;
}

.chwa-btn-primary {
    background: var(--wa-green);
    color: white !important;
}

.chwa-btn-primary:hover {
    background: var(--wa-green-hover);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.chwa-btn-outline {
    background: transparent;
    color: var(--text-muted) !important;
    border: 1px solid var(--glass-border);
}

.chwa-btn-outline:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--text-muted);
}

/* Custom Message Area */
.chwhatsapp-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.chwhatsapp-textarea:focus {
    outline: none;
    border-color: var(--wa-green);
}

/* Footer */
.chwhatsapp-footer {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--glass-border);
}

/* Tags */
.chwa-tag {
    background: #ebf4ff;
    color: #3182ce;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid #bee3f8;
}

/* Preview Links */
.chwa-preview-link {
    color: #0056b3 !important; /* Deeper blue for better contrast */
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px !important;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 20;
    word-break: break-all; /* Ensure long URLs don't break layout */
}

.chwa-preview-link:hover {
    color: #2c5282 !important;
    text-decoration: none !important;
}

/* Client Choice Radios */
.chwa-radio-label {
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chwa-radio-label:hover {
    color: var(--wa-green);
}

.chwa-radio-label input[type="radio"] {
    cursor: pointer;
    accent-color: var(--wa-green);
}

/* Responsive */
@media screen and (max-width: 600px) {
    .chwhatsapp-modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

