/* Celsian Chatbot Admin Styles */

/* Welcome Notice Banner */
.celsian-welcome-notice {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin: 20px 20px 20px 0;
    overflow: hidden;
}

.celsian-welcome-notice .notice-dismiss {
    top: 12px;
    right: 12px;
    padding: 8px;
}

.celsian-welcome-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.celsian-welcome-text {
    flex: 1 1 60%;
    padding: 40px 20px 40px 40px;
}

.celsian-welcome-tagline {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #007cba;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.celsian-welcome-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.3;
    margin: 0 0 14px 0;
}

.celsian-welcome-description {
    font-size: 15px;
    line-height: 1.6;
    color: #50575e;
    margin: 0 0 24px 0;
    max-width: 480px;
}

.celsian-welcome-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.celsian-welcome-cta:hover,
.celsian-welcome-cta:focus {
    background: linear-gradient(135deg, #005a87 0%, #004165 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
    transform: translateY(-1px);
}

.celsian-welcome-illustration {
    flex: 0 0 320px;
    padding: 20px 40px 20px 0;
}

.celsian-welcome-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 960px) {
    .celsian-welcome-content {
        gap: 20px;
    }

    .celsian-welcome-illustration {
        flex: 0 0 240px;
    }
}

@media (max-width: 768px) {
    .celsian-welcome-notice {
        margin-right: 0;
    }

    .celsian-welcome-content {
        flex-direction: column;
        gap: 0;
    }

    .celsian-welcome-text {
        padding: 30px 24px;
    }

    .celsian-welcome-heading {
        font-size: 22px;
    }

    .celsian-welcome-illustration {
        display: none;
    }
}

/* Main Section Layout */
.celsian-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.celsian-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e1e1;
    padding: 12px 20px;
}

.celsian-section-header h2 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.celsian-section-body {
    padding: 25px;
}

/* Main Status Section */
.celsian-main-section .celsian-section-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 10px 20px;
}

/* Status Toggle */
.celsian-status-toggle {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.celsian-status-toggle.celsian-disabled {
    background: #f1f3f4;
    border-color: #dadce0;
    opacity: 0.7;
}

.celsian-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.celsian-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.celsian-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.celsian-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 32px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.celsian-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    top: 4px;
    background: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.celsian-toggle input:checked + .celsian-slider {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.celsian-toggle input:checked + .celsian-slider:before {
    transform: translateX(28px);
}

.celsian-toggle input:disabled + .celsian-slider {
    background: #6c757d;
    cursor: not-allowed;
}

.celsian-toggle input:disabled + .celsian-slider:before {
    background: #e9ecef;
}

.celsian-disabled .celsian-toggle-label,
.celsian-disabled .celsian-toggle-description {
    color: #6c757d !important;
}

.celsian-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.celsian-toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.celsian-toggle-description {
    font-size: 14px;
    color: #666;
}

/* Connection Status */
.celsian-connection-status {
    margin-top: 20px;
}

.celsian-status-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid;
}

.celsian-status-card.connected {
    background: #d4edda;
    border-color: #c3e6cb;
}

.celsian-status-card.not-connected {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.celsian-status-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.celsian-status-card.connected .celsian-status-icon {
    background: #28a745;
    color: white;
}

.celsian-status-card.not-connected .celsian-status-icon {
    background: #dc3545;
    color: white;
}

.celsian-status-info h3 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.celsian-status-info p {
    margin: 0;
    color: #666;
}

/* Setup Options */
.celsian-setup-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.celsian-option-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.celsian-option-card:hover {
    border-color: #007cba;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.celsian-option-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #007cba;
    color: white;
    border-radius: 8px;
    flex-shrink: 0;
}

.celsian-option-content h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.celsian-option-content p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Collapsible Sections */
.celsian-collapsible-section .celsian-section-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.celsian-collapsible-section .celsian-section-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.celsian-toggle-arrow {
    font-size: 16px;
    color: #666;
    transition: transform 0.3s ease;
}

.celsian-section-toggle.active .celsian-toggle-arrow {
    transform: rotate(180deg);
}

.celsian-collapsible-section .celsian-section-content {
    display: none;
}

.celsian-collapsible-section .celsian-section-content.active {
    display: block;
}

/* Form Groups */
.celsian-form-group {
    margin-bottom: 25px;
}

.celsian-group-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.celsian-form-group input[type="text"],
.celsian-select,
.celsian-textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.celsian-form-group input[type="text"]:focus,
.celsian-select:focus,
.celsian-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.celsian-textarea {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    background: #f9f9f9;
    resize: vertical;
    min-height: 120px;
}

/* Custom CSS Side-by-Side Layout */
.celsian-css-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.celsian-css-editor {
    flex: 1 1 0;
    min-width: 0;
}

.celsian-css-editor .celsian-textarea {
    max-width: none;
    width: 100%;
    height: 525px;
    box-sizing: border-box;
}

.celsian-css-tips {
    flex: 1 1 0;
    min-width: 0;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 16px;
    font-size: 13px;
}

.celsian-css-tips-title {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.celsian-css-selectors {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.celsian-css-selectors li code {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 11px;
    color: #333;
}

.celsian-css-example {
    background: #2d2d2d;
    color: #ccc;
    padding: 12px;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

.celsian-copy-btn {
    background: none;
    border: 1px solid #c1c1c1;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.celsian-copy-btn:hover {
    background: #e9ecef;
    border-color: #999;
    color: #333;
}

@media (max-width: 960px) {
    .celsian-css-layout {
        flex-direction: column;
    }

    .celsian-css-tips {
        flex: none;
        width: 100%;
    }
}

/* Position Options */
.celsian-position-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.celsian-position-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.celsian-position-option input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.celsian-position-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.celsian-position-option input[type="radio"]:checked + .celsian-position-visual {
    border-color: #007cba;
    background: #e3f2fd;
}

.celsian-position-name {
    font-weight: 500;
    color: #333;
}

.celsian-position-icon {
    font-size: 18px;
    color: #007cba;
}

/* Integration Details */
.celsian-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.celsian-detail-item {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.celsian-detail-item label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.celsian-detail-item code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
    color: #333;
}

/* Actions */
.celsian-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.celsian-actions .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
}

/* Legacy Status Indicators */
.celsian-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.celsian-status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.celsian-status.not-connected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .celsian-setup-options {
        grid-template-columns: 1fr;
    }
    
    .celsian-position-options {
        grid-template-columns: 1fr;
    }
    
    .celsian-details-grid {
        grid-template-columns: 1fr;
    }
    
    .celsian-option-card {
        flex-direction: column;
        text-align: center;
    }
    
    .celsian-toggle-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .celsian-actions {
        flex-direction: column;
    }
    
    .celsian-actions .button {
        width: 100%;
    }
}

/* Button Improvements */
.button-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    border-color: #007cba;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004165 100%);
    border-color: #005a87;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Updating Animation */
.celsian-updating {
    position: relative;
    overflow: hidden;
}

.celsian-updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: celsian-shimmer 1s ease-in-out;
}

@keyframes celsian-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}