/**
 * Frontend Styles for AI Content CMS
 */

/* Toast Notifications */
.aicc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.aicc-toast {
    background: #f1f1f1;
    border-left: 4px solid #0073aa;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-in-out;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.aicc-toast.show {
    opacity: 1;
}

.aicc-toast-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.aicc-toast-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.aicc-toast-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.aicc-toast-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.aicc-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.aicc-toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* User Dashboard */
.aicc-user-dashboard {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aicc-user-dashboard h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.aicc-dashboard-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .aicc-dashboard-container {
        grid-template-columns: 1fr;
    }
}

/* Editor Section */
.aicc-editor-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.aicc-editor-section h3 {
    color: #333;
    margin-top: 0;
}

.aicc-prompt-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.aicc-prompt-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.aicc-prompt-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    resize: vertical;
}

.aicc-prompt-section .button {
    margin-top: 10px;
    margin-right: 10px;
}

#aicc-generation-spinner {
    margin-left: 10px;
    vertical-align: middle;
}

#aicc-generation-spinner .spinner {
    float: none;
    margin: 0;
    display: inline-block;
}

/* Form Groups */
.aicc-form-group {
    margin-bottom: 20px;
}

.aicc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.aicc-form-group input[type="text"],
.aicc-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

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

/* Form Actions */
.aicc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.aicc-form-actions .button {
    flex: 1;
}

/* Submissions Section */
.aicc-submissions-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.aicc-submissions-section h3 {
    color: #333;
    margin-top: 0;
}

.aicc-submissions-section table {
    width: 100%;
    font-size: 14px;
}

.aicc-submissions-section table th,
.aicc-submissions-section table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.aicc-submissions-section table th {
    background: #e9e9e9;
    font-weight: bold;
}

.aicc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.aicc-badge-success {
    background: #d4edda;
    color: #155724;
}

.aicc-badge-error {
    background: #f8d7da;
    color: #721c24;
}

.aicc-badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Editor (WordPress) */
.wp-editor-container {
    margin: 10px 0;
}

.wp-editor-area {
    width: 100%;
    font-family: Menlo, Monaco, monospace;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.button:hover {
    background: #efefef;
    border-color: #999;
}

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

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .aicc-dashboard-container {
        grid-template-columns: 1fr;
    }

    .aicc-form-actions {
        flex-direction: column;
    }

    .aicc-toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
