/* ==========================================================
   AW INTELLIGENCE CENTER - style.css (default graphics)
   Plugin: AW Intelligence Center 1.0.0
   Two parts: 1) the support chat on your site, 2) the plugin page in the admin area.
   To change the look: download this file from the "Graphics" card of the plugin page,
   edit it and upload it back. The uploaded file REPLACES this one (keep both parts).
   ========================================================== */


/* ==========================================================
   1) SUPPORT CHAT (front end)
   ========================================================== */

@keyframes aw-pulse {
0% { box-shadow: 0 0 0 0 rgba(16,158,209,0.6); } 70% { box-shadow: 0 0 0 16px rgba(16,158,209,0); } 100% { box-shadow: 0 0 0 0 rgba(16,158,209,0); }
}

.aw-chat-root {
position: fixed; bottom: 20px; z-index: 99999; font-family: 'Rethink Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.aw-chat-root.aw-pos-right {
right: 20px;
}

.aw-chat-root.aw-pos-left {
left: 20px;
}

.aw-chat-trigger {
position: relative; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 0; border-radius: 50%; background: #109ED1; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.aw-chat-trigger.aw-pulse {
animation: aw-pulse 2s infinite;
}

.aw-pos-left .aw-chat-trigger {
margin-right: auto;
}

.aw-pos-right .aw-chat-trigger {
margin-left: auto;
}

.aw-proactive-bubble {
position: absolute; bottom: 70px; width: 220px; padding: 12px 14px; border-radius: 12px; background: #fff; color: #1B1B29; font-size: 14px; line-height: 1.35; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,0.2); opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; pointer-events: none;
}

.aw-pos-right .aw-proactive-bubble {
right: 0;
}

.aw-pos-left .aw-proactive-bubble {
left: 0;
}

.aw-proactive-bubble.bubble-visible {
opacity: 1; transform: translateY(0);
}

.aw-chat-widget {
position: absolute; bottom: 75px; width: 340px; max-width: calc(100vw - 40px); border-radius: 16px; background: #1B1B29; color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,0.35); overflow: hidden;
}

.aw-pos-right .aw-chat-widget {
right: 0;
}

.aw-pos-left .aw-chat-widget {
left: 0;
}

.aw-chat-widget.aw-chat-closed {
display: none;
}

.aw-chat-widget.aw-chat-open {
display: block;
}

.aw-chat-header {
display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #2d3448;
}

.aw-chat-status {
display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
}

.aw-status-dot {
display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}

.aw-status-dot.online-dot {
background: #2ecc71; box-shadow: 0 0 8px #2ecc71;
}

.aw-status-dot.offline-dot {
background: #ff5c5c;
}

.aw-close-chat {
border: 0; background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}

.aw-chat-body {
padding: 16px;
}

.aw-welcome-msg {
margin: 0 0 12px 0; font-size: 15px; color: #d7d9e4;
}

.aw-chat-widget.is-vip-mode .aw-chat-header {
background: #3a3420;
}

.aw-chat-widget.is-vip-mode .aw-chat-status {
color: #FFD700;
}

.aw-chat-form input, .aw-chat-form textarea {
display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px 0; padding: 10px 12px; border: 1px solid #3b4260; border-radius: 8px; background: #23263a; color: #fff; font-size: 14px; font-family: inherit;
}

.aw-chat-form textarea {
resize: vertical; min-height: 90px;
}

.aw-chat-form input:focus, .aw-chat-form textarea:focus {
outline: 2px solid #109ED1; border-color: #109ED1;
}

.aw-send-btn {
width: 100%; padding: 11px; border: 0; border-radius: 8px; background: #109ED1; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}

.aw-send-btn:disabled {
opacity: 0.6; cursor: default;
}

.aw-form-response p {
margin: 10px 0 0 0; font-weight: 700;
}

.aw-response-ok {
color: #2ecc71;
}

.aw-response-error {
color: #ff5c5c;
}


/* ==========================================================
   2) PLUGIN PAGE (admin area)
   ========================================================== */

.aw-title {
display: flex; align-items: center; gap: 10px; font-weight: 800; color: #1B1B29;
}

.aw-crm-container {
background: #fcfcf0; padding: 25px; border-radius: 12px; border: 1px solid #f0e68c; max-width: 1450px; margin-top: 20px; font-family: 'Rethink Sans', sans-serif;
}


/* ---------- Cards and form ---------- */

.aw-admin-card {
background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 25px; border: 1px solid #eee;
}

.aw-admin-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; align-items: end;
}

.aw-admin-grid label {
display: block; margin-bottom: 4px;
}

.aw-admin-grid input, .aw-admin-grid select {
padding: 10px; border: 1px solid #ccc; border-radius: 4px; width: 100%;
}

.aw-admin-grid input[type="checkbox"] {
width: auto; padding: 0;
}

.aw-admin-servizi {
margin-top: 20px; padding: 15px; border: 1px solid #eee; border-radius: 4px;
}

.aw-admin-servizi-titolo {
font-weight: bold; display: block; margin-bottom: 10px;
}

.aw-admin-servizi-griglia {
display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}

.aw-admin-nota {
margin: 12px 0 0 0; color: #666; font-size: 13px;
}

.aw-admin-impostazioni, .aw-admin-grafica, .aw-admin-upgrade, .aw-admin-licenza, .aw-admin-branding, .aw-admin-testi {
margin-top: 25px; margin-bottom: 0;
}

.aw-admin-lista {
margin: 10px 0 10px 20px; list-style: disc;
}

.aw-admin-lingua {
margin: 10px 0; padding: 10px 14px; border: 1px solid #eee; border-radius: 4px;
}


/* ---------- Client table ---------- */

.aw-admin-table {
width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; margin-top: 20px;
}

.aw-admin-table th {
text-align: left; padding: 12px; background: #f8f9fa; border-bottom: 2px solid #eee; color: #333; font-weight: 800;
}

.aw-admin-table td {
padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle;
}

.aw-dominio {
color: #109ED1;
}

.aw-badge-service {
background: #109ED1; color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; margin-right: 5px;
}

.vip-row {
background-color: rgba(46, 204, 113, 0.1) !important;
}

.aw-delete-link {
color: #d63638; text-decoration: none; font-weight: bold;
}
