/**
 * ComturkAI Web Chat Integration - Admin Styles
 */

/* Dashboard Layout */
.comturkai-dashboard {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-top: 20px;
}

.comturkai-dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comturkai-dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards */
.comturkai-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

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

.comturkai-card h3 {
    margin-top: 0;
}

/* Status Badge */
.comturkai-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.comturkai-status-active {
    background: #d4edda;
    color: #155724;
}

.comturkai-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Usage Bar */
.comturkai-usage-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.comturkai-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    transition: width 0.3s ease;
}

/* Setup Wizard */
.comturkai-setup-wizard {
    max-width: 800px;
}

.comturkai-setup-step {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 30px;
    margin-top: 20px;
}

.comturkai-setup-step h2 {
    margin-top: 0;
    color: #1d2327;
}

.comturkai-setup-step ol,
.comturkai-setup-step ul {
    line-height: 1.8;
}

.comturkai-setup-step .button-hero {
    padding: 12px 36px;
    font-size: 16px;
    height: auto;
}

/* Progress Bar */
.comturkai-setup-step progress {
    width: 100%;
    height: 30px;
    margin-bottom: 10px;
}

.comturkai-setup-step progress::-webkit-progress-bar {
    background-color: #f0f0f1;
    border-radius: 4px;
}

.comturkai-setup-step progress::-webkit-progress-value {
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    border-radius: 4px;
}

.comturkai-setup-step progress::-moz-progress-bar {
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    border-radius: 4px;
}

/* Widget Preview */
.comturkai-widget-preview {
    padding: 15px;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    margin-top: 15px;
}

/* Auth Container */
#comturkai-auth-container {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#comturkai-google-auth .dashicons-google {
    font-size: 20px;
    margin-right: 8px;
}

/* Status Messages */
#comturkai-auth-status,
#comturkai-callback-status,
#comturkai-configure-status,
#comturkai-crawl-status {
    margin-top: 15px;
}

#comturkai-auth-status .error,
#comturkai-callback-status .error,
#comturkai-configure-status .error,
#comturkai-crawl-status .error {
    color: #d63638;
    background: #f8d7da;
    padding: 10px;
    border-left: 4px solid #d63638;
}

#comturkai-auth-status .success,
#comturkai-callback-status .success,
#comturkai-configure-status .success,
#comturkai-crawl-status .success {
    color: #155724;
    background: #d4edda;
    padding: 10px;
    border-left: 4px solid #155724;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .comturkai-dashboard {
        grid-template-columns: 1fr;
    }

    .comturkai-dashboard-sidebar {
        order: -1;
    }
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.comturkai-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, .1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 10px;
}