/**
 * Admin styles for A1AI Chatbot
 *
 * @package    A1AI
 * @subpackage A1AI/admin/css
 */

/* Admin Common Styles */
.a1ai-wrap {
    margin: 20px 20px 0 0;
}

.a1ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.a1ai-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    padding: 20px;
}

.a1ai-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    padding: 15px;
}

.a1ai-card h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Dashboard specific styles */
.a1ai-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
}

.a1ai-stats-card {
    padding: 15px;
    border-radius: 3px;
    background: #f9f9f9;
}

.a1ai-stats-number {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

/* Settings form styles */
.a1ai-settings-form .form-table th {
    width: 200px;
    padding: 15px 10px;
}

.a1ai-api-key-field {
    width: 350px;
}

/* Chatbot management styles */
.a1ai-chatbots-list {
    margin-top: 20px;
}

.a1ai-chatbot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.a1ai-chatbot-name {
    font-weight: 600;
}

.a1ai-chatbot-actions {
    display: flex;
    gap: 10px;
}

/* Form field styles */
.a1ai-form-field {
    margin-bottom: 15px;
}

.a1ai-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.a1ai-form-field input[type="text"],
.a1ai-form-field input[type="number"],
.a1ai-form-field textarea,
.a1ai-form-field select {
    width: 100%;
    max-width: 400px;
}

.a1ai-form-field textarea {
    min-height: 100px;
}

/* Tabs navigation */
.a1ai-tabs-nav {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}

.a1ai-tabs-nav a {
    padding: 10px 15px;
    margin-right: 5px;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
    border-bottom: none;
}

.a1ai-tabs-nav a.active {
    border-color: #ccc;
    background: #fff;
    border-bottom-color: #fff;
    margin-bottom: -1px;
    color: #000;
}

/* Messages and Notices */
.a1ai-notice {
    padding: 10px 15px;
    margin: 15px 0;
    border-left: 4px solid #00a0d2;
    background: #f7f7f7;
}

.a1ai-notice.a1ai-notice-warning {
    border-color: #ffb900;
}

.a1ai-notice.a1ai-notice-error {
    border-color: #dc3232;
}

.a1ai-notice.a1ai-notice-success {
    border-color: #46b450;
}

/* Modal styles */
.a1ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a1ai-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.a1ai-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a1ai-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.a1ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a1ai-modal-close:hover {
    color: #000;
}

.a1ai-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Conversations side-by-side layout */
.a1ai-conversations-container {
    display: flex;
    gap: 20px;
    height: 600px;
}

.a1ai-conversations-table {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.a1ai-conversations-table table {
    height: 100%;
}

.a1ai-conversations-table tbody {
    height: calc(100% - 40px);
    overflow-y: auto;
}

.a1ai-conversation-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.a1ai-conversation-row:hover {
    background-color: #f9f9f9;
}

.a1ai-conversation-row.selected {
    background-color: #e7f3ff;
}

/* Conversation preview panel */
.a1ai-conversation-preview {
    width: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.a1ai-preview-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a1ai-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.a1ai-preview-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a1ai-preview-close:hover {
    color: #000;
}

.a1ai-preview-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.a1ai-preview-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.a1ai-preview-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.a1ai-preview-info {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.a1ai-preview-meta {
    margin-bottom: 10px;
}

.a1ai-preview-meta span {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

.a1ai-preview-meta .a1ai-preview-chatbot {
    font-weight: 600;
    color: #333;
}

.a1ai-preview-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

/* Conversation messages styling */
.a1ai-conversation-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
}

.a1ai-conversation-message.user {
    background-color: #f0f8ff;
    border-left: 4px solid #0073aa;
}

.a1ai-conversation-message.assistant {
    background-color: #f9f9f9;
    border-left: 4px solid #46b450;
}

.a1ai-conversation-message.system {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.a1ai-conversation-message .role {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
    color: #666;
}

.a1ai-conversation-message .content {
    margin-bottom: 5px;
    line-height: 1.4;
}

.a1ai-conversation-message .time {
    font-size: 11px;
    color: #999;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .a1ai-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .a1ai-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .a1ai-chatbot-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .a1ai-chatbot-actions {
        justify-content: flex-start;
    }
    
    .a1ai-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .a1ai-modal-body {
        max-height: 70vh;
    }
    
    /* Conversations responsive layout */
    .a1ai-conversations-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .a1ai-conversations-table {
        height: 400px;
    }
    
    .a1ai-conversation-preview {
        width: 100%;
        height: 400px;
    }
} 

/* Upgrades, Add-Ons & Services Tab Styles */
.a1ai-upgrades-section {
    margin-bottom: 32px;
    animation: a1ai-fadein 0.8s;
}
.a1ai-upgrades-columns {
    display: flex;
    gap: 32px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.a1ai-upgrade-card {
    flex: 1 1 260px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0e7ff 100%);
    border: 2px solid #4f8cff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(79,140,255,0.08);
    padding: 24px 20px 20px 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.a1ai-upgrade-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(79,140,255,0.18);
    z-index: 2;
}
.a1ai-upgrade-card h4 {
    margin-top: 0;
    color: #2a3d6a;
    font-size: 1.2em;
    margin-bottom: 10px;
}
.a1ai-upgrade-card ul {
    margin: 0 0 16px 0;
    padding-left: 18px;
}
.a1ai-upgrade-card li {
    margin-bottom: 6px;
    font-size: 1em;
}
.a1ai-upgrade-link {
    font-weight: 600;
    font-size: 1em;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
    transition: background 0.2s, color 0.2s;
}
.a1ai-upgrade-card.a1ai-upgrade-standard {
    border-color: #4f8cff;
}
.a1ai-upgrade-card.a1ai-upgrade-enterprise {
    border-color: #ffb347;
    background: linear-gradient(135deg, #fff7e0 0%, #ffe7b0 100%);
}
.a1ai-upgrade-card.a1ai-upgrade-enterprise .a1ai-upgrade-link {
    background: #ffb347;
    color: #fff;
}
.a1ai-upgrades-title {
    font-size: 1.5em;
    margin-bottom: 18px;
    color: #2a3d6a;
    letter-spacing: 0.5px;
}
.a1ai-addons-section, .a1ai-services-section {
    margin-bottom: 32px;
    background: #f8fafd;
    border-left: 4px solid #4f8cff;
    padding: 18px 22px 12px 22px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(79,140,255,0.04);
    animation: a1ai-fadein 1.2s;
}
.a1ai-addons-section h3, .a1ai-services-section h3 {
    margin-top: 0;
    color: #2a3d6a;
}
.a1ai-addons-link, .a1ai-services-link {
    margin-top: 10px;
    display: inline-block;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
    transition: background 0.2s, color 0.2s;
}
@media (max-width: 900px) {
    .a1ai-upgrades-columns {
        flex-direction: column;
        gap: 18px;
    }
}
@keyframes a1ai-fadein {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
} 

/* Upgrades Tab Flashy Enhancements */
.a1ai-upgrades-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 80% 20%, #e0e7ff 0%, transparent 60%),
                radial-gradient(circle at 20% 80%, #ffe7b0 0%, transparent 70%);
    opacity: 0.25;
    animation: a1ai-bg-move 8s linear infinite alternate;
}
@keyframes a1ai-bg-move {
    0% { background-position: 80% 20%, 20% 80%; }
    100% { background-position: 60% 40%, 40% 60%; }
}
.a1ai-tab-content#tab-upgrades { position: relative; overflow: hidden; }

.a1ai-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 7px;
    font-size: 1.2em;
    color: #4f8cff;
}
.a1ai-icon-stars::before { content: '\2605\2605'; color: #ffb347; }
.a1ai-icon-rocket::before { content: '\1F680'; color: #4f8cff; }
.a1ai-icon-puzzle::before { content: '\1F9E9'; color: #6c63ff; }
.a1ai-icon-cog::before { content: '\2699'; color: #2a3d6a; }
.a1ai-icon-arrow::before { content: '\2192'; color: inherit; }

.a1ai-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #ffb347;
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(255,179,71,0.10);
    z-index: 2;
    letter-spacing: 0.5px;
    animation: a1ai-badge-pop 1.2s;
}
.a1ai-badge-popular { background: #4f8cff; }
.a1ai-badge-value { background: #ffb347; }
@keyframes a1ai-badge-pop {
    0% { transform: scale(0.7); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}
.a1ai-glow {
    box-shadow: 0 0 24px 4px #ffb34755, 0 4px 24px rgba(79,140,255,0.08);
    border-width: 3px;
    animation: a1ai-glow-pulse 2.5s infinite alternate;
}
@keyframes a1ai-glow-pulse {
    0% { box-shadow: 0 0 24px 4px #ffb34755, 0 4px 24px rgba(79,140,255,0.08); }
    100% { box-shadow: 0 0 36px 10px #ffb34799, 0 8px 32px rgba(79,140,255,0.18); }
}
.a1ai-section-divider {
    border: none;
    border-top: 2px dashed #e0e7ff;
    margin: 36px 0 32px 0;
    width: 100%;
    opacity: 0.7;
}
.a1ai-btn-flash {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s, background 0.2s;
}
.a1ai-btn-flash::after {
    content: '';
    position: absolute;
    left: -75%;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.7) 100%);
    transform: skewX(-20deg);
    transition: left 0.4s;
    pointer-events: none;
}
.a1ai-btn-flash:hover::after {
    left: 120%;
    transition: left 0.4s;
}
.a1ai-btn-flash:hover, .a1ai-upgrade-link:hover {
    box-shadow: 0 4px 16px #4f8cff33;
    background: #e0e7ff;
    color: #2a3d6a;
} 