/* Knowledge AI Bot - Admin Styles */

/* Professional Header Banner */
.kaib-admin-header-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 -20px 20px -20px;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.kaib-header-content {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.kaib-header-branding {
    flex: 1;
    min-width: 300px;
}

.kaib-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.kaib-logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.kaib-logo-text h1 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.kaib-version {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.kaib-header-description p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    max-width: 500px;
}

.kaib-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kaib-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.kaib-btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.kaib-btn-primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #5a6fd8;
}

.kaib-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.kaib-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

/* Navigation Tabs */
.kaib-nav-tabs {
    margin: -20px -20px 30px -20px;
    background: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kaib-nav-tabs .nav-tab-wrapper {
    margin: 0;
    padding: 0 30px;
    border-bottom: none;
}

.kaib-nav-tabs .nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    margin: 0 5px 0 0;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.kaib-nav-tabs .nav-tab:hover {
    color: #667eea;
    background: #f8f9ff;
}

.kaib-nav-tabs .nav-tab-active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9ff;
    font-weight: 600;
}

.kaib-nav-tabs .nav-tab svg {
    opacity: 0.7;
}

.kaib-nav-tabs .nav-tab-active svg {
    opacity: 1;
}

/* Tab Content */
.kaib-tab-content {
    position: relative;
}

.kaib-tab-panel {
    display: none;
}

.kaib-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhance existing form styles */
.kaib-tab-panel .form-table {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

.kaib-tab-panel h2 {
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 22px;
    font-weight: 600;
}

.kaib-admin-wrapper {
    max-width: 800px;
    margin: 20px 0;
}

.kaib-admin-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.kaib-admin-header h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.kaib-admin-header p {
    margin: 0;
    color: #666;
}

/* Settings form styling */
.form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
    vertical-align: top;
}

.form-table td {
    padding: 15px 10px;
}

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

.form-table textarea {
    resize: vertical;
    min-height: 120px;
}

/* API Key field with toggle visibility */
.api-key-wrapper {
    position: relative;
    max-width: 400px;
}

.api-key-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

/* Select dropdown styling */
select#llm_service {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* Description text */
.description {
    font-size: 13px;
    font-style: normal;
    color: #666;
    margin-top: 5px;
}

/* Success/Error messages */
.notice {
    max-width: 800px;
}

/* Status indicator */
.kaib-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

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

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

/* Info box */
.kaib-info-box {
    background: #f0f8ff;
    border: 1px solid #b8daff;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.kaib-info-box h3 {
    margin-top: 0;
    color: #004085;
}

.kaib-info-box ul {
    margin-bottom: 0;
}

/* Submit button enhancement */
.submit {
    padding-top: 20px;
}

#submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 30px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Donation Section Styles */
.kaib-donation-section {
    max-width: 800px;
    margin: 30px 0 20px 0;
}

.kaib-donation-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kaib-donation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.kaib-donation-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.kaib-donation-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.kaib-donation-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.kaib-donation-content {
    padding: 30px;
}

.kaib-donation-text h3,
.kaib-donation-methods h3 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.kaib-donation-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.kaib-donation-benefits li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.kaib-donation-message {
    background: #f0f8ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.kaib-donation-message p {
    margin: 0 0 10px 0;
    color: #004085;
}

.kaib-donation-message p:last-child {
    margin-bottom: 0;
}

.kaib-donation-methods {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.kaib-donation-method {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.kaib-donation-method h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.kaib-donation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.kaib-donate-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.kaib-donate-small {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.kaib-donate-small:hover {
    background: linear-gradient(135deg, #218838, #1ea08a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.kaib-donate-medium {
    background: linear-gradient(135deg, #fd7e14, #e63946);
    color: white;
}

.kaib-donate-medium:hover {
    background: linear-gradient(135deg, #e8710a, #dc2626);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.4);
}

.kaib-donate-large {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
}

.kaib-donate-large:hover {
    background: linear-gradient(135deg, #5a32a3, #d61a7b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
}

.kaib-donate-custom {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.kaib-donate-custom:hover {
    background: linear-gradient(135deg, #5a6fd8, #684a94);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.kaib-custom-amount {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.kaib-custom-amount input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.kaib-qr-section {
    text-align: center;
}

.kaib-qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.kaib-qr-code {
    max-width: 150px;
    height: auto;
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kaib-qr-text {
    font-size: 14px;
    color: #555;
    margin: 0;
    text-align: left;
}

.kaib-donation-footer {
    background: #f8f9fa;
    padding: 25px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.kaib-donation-footer p {
    margin: 0 0 10px 0;
    color: #495057;
}

.kaib-donation-footer p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    .form-table th {
        padding-bottom: 5px;
    }
    
    /* Header banner mobile */
    .kaib-admin-header-banner {
        margin: 0 -10px 20px -10px;
    }
    
    .kaib-header-content {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .kaib-header-branding {
        min-width: auto;
        width: 100%;
    }
    
    .kaib-logo {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .kaib-logo-text h1 {
        font-size: 24px;
    }
    
    .kaib-header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .kaib-header-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    /* Navigation tabs mobile */
    .kaib-nav-tabs {
        margin: -20px -10px 30px -10px;
    }
    
    .kaib-nav-tabs .nav-tab-wrapper {
        padding: 0 20px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .kaib-nav-tabs .nav-tab {
        display: inline-flex;
        flex-shrink: 0;
        padding: 12px 16px;
        margin-right: 10px;
        font-size: 13px;
    }
    
    /* Form tables mobile */
    .kaib-tab-panel .form-table {
        padding: 20px;
        margin: 0 -10px 20px -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .kaib-donation-content {
        padding: 20px;
    }
    
    .kaib-donation-header {
        padding: 20px;
    }
    
    .kaib-donation-buttons {
        flex-direction: column;
    }
    
    .kaib-donate-btn {
        width: 100%;
        text-align: center;
    }
    
    .kaib-qr-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .kaib-qr-text {
        text-align: center;
    }
    
    .kaib-custom-amount form {
        flex-direction: column;
        gap: 10px;
        align-items: stretch !important;
    }
    
    .kaib-custom-amount input[type="number"] {
        width: 100% !important;
    }
}

/* Plugin Recommendations Section */
.kaib-recommendations-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 12px;
    border: 2px solid #667eea;
}

.kaib-recommendations-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
    font-weight: 700;
}

.kaib-recommendations-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.4;
}

.kaib-recommendations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.kaib-plugin-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.kaib-plugin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.kaib-plugin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.kaib-plugin-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e1e5e9;
    z-index: 2;
}

.kaib-plugin-content {
    padding: 30px;
    padding-right: 100px;
}

.kaib-plugin-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.kaib-plugin-tagline {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #667eea;
}

.kaib-plugin-description {
    margin: 0 0 25px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.kaib-plugin-features {
    margin: 20px 0;
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.kaib-plugin-features h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.kaib-plugin-features ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.kaib-plugin-features li {
    margin: 8px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.kaib-plugin-use-cases {
    margin: 20px 0;
    background: #fff8f0;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #fd7e14;
}

.kaib-plugin-use-cases h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.kaib-plugin-use-cases p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.kaib-plugin-cta {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.kaib-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.kaib-cta-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.kaib-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.kaib-cta-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.kaib-cta-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.kaib-recommendations-footer {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
}

.kaib-recommendations-message h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.kaib-recommendations-message p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.kaib-recommendations-message ul {
    margin: 0 0 20px 0;
    padding-left: 0;
    list-style: none;
}

.kaib-recommendations-message li {
    margin: 10px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
}

.kaib-recommendations-message li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
}

/* Responsive adjustments for recommendations */
@media screen and (max-width: 782px) {
    .kaib-plugin-content {
        padding: 20px;
        padding-right: 20px;
    }
    
    .kaib-plugin-icon {
        position: static;
        margin: 0 auto 20px auto;
        width: 50px;
        height: 50px;
    }
    
    .kaib-plugin-title {
        font-size: 20px;
        text-align: center;
    }
    
    .kaib-plugin-tagline {
        text-align: center;
    }
    
    .kaib-plugin-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .kaib-cta-button {
        justify-content: center;
        width: 100%;
    }
    
    .kaib-recommendations-header {
        padding: 20px;
        margin: 0 -10px 20px -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .kaib-recommendations-header h2 {
        font-size: 24px;
    }
    
    .kaib-recommendations-footer {
        margin: 30px -10px 0 -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px;
    }
    
    .kaib-plugin-card {
        margin: 0 -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .kaib-plugin-card::before {
        display: none;
    }
}