/**
 * RiteBot AI Admin Styles
 * 
 * Professional styling for the RiteBot AI WordPress plugin admin interface
 */

/* Main Container */
.ritebot-admin {
    margin: 20px 0;
}

.ritebot-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow: hidden;
}

/* Navigation Tabs */
.nav-tab-wrapper {
    background: #f8f9fa;
    border-bottom: 1px solid #ccd0d4;
    padding: 0 20px;
    margin: 0;
}

.nav-tab {
    border: none;
    background: transparent;
    color: #50575e;
    font-weight: 500;
    padding: 15px 20px;
    margin: 0;
    border-radius: 0;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: #e9ecef;
    color: #0073aa;
    border: none;
}

.nav-tab-active,
.nav-tab.active {
    background: #fff;
    color: #0073aa;
    border: none;
    border-bottom: 3px solid #0073aa;
    margin-bottom: -1px;
}

.nav-tab .dashicons {
    margin-right: 8px;
    font-size: 16px;
}

/* Tab Content */
.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Sections */
.ritebot-section {
    margin-bottom: 40px;
}

.ritebot-section h2 {
    color: #1d2327;
    font-size: 24px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.ritebot-section p {
    color: #646970;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Forms */
.ritebot-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-row input[type="text"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.form-row input[type="text"]:focus,
.form-row input[type="file"]:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row .description {
    margin-top: 5px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

/* Buttons */
.button {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-primary {
    background: #0073aa;
    color: #fff;
}

.button-primary:hover {
    background: #005a87;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.button-secondary {
    background: #f0f0f1;
    color: #2c3338;
    border: 1px solid #c3c4c7;
}

.button-secondary:hover {
    background: #dcdcde;
    color: #2c3338;
    border-color: #8c8f94;
}

.button-hero {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* Results */
.ritebot-result {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ritebot-result h3 {
    color: #1d2327;
    margin-bottom: 20px;
    font-size: 20px;
}

.content-output {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 20px;
    font-family: 'Georgia', serif;
    line-height: 1.7;
    color: #2c3338;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.result-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Content Manager */
.manager-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box input {
    flex: 1;
    max-width: 400px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls select {
    min-width: 150px;
}

/* Content List */
.content-list {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    min-height: 200px;
}

.no-content,
.no-profiles {
    text-align: center;
    color: #646970;
    font-style: italic;
    padding: 40px 20px;
}

/* Content Insights */
.content-insights {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 25px;
    margin-top: 25px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.insight-card h4 {
    color: #646970;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-number {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
}

.insight-text {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

/* Profiles */
.profiles-controls {
    margin-bottom: 20px;
}

.profiles-list {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    min-height: 200px;
}

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

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    color: #1d2327;
}

.close {
    color: #646970;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #1d2327;
}

.modal-body {
    padding: 25px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #646970;
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-content {
        padding: 20px;
    }
    
    .ritebot-form {
        padding: 20px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls select {
        min-width: auto;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* WordPress Admin Integration */
.wp-admin .ritebot-admin .wrap {
    margin: 20px 0;
}

.wp-admin .ritebot-admin h1 {
    margin-bottom: 20px;
}

/* Custom Scrollbar */
.content-output::-webkit-scrollbar {
    width: 8px;
}

.content-output::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.content-output::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.content-output::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 