/* CBC Lesson Planner - Public Styles */

.cbc-planner-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cbc-planner-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.cbc-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.cbc-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.cbc-form-container {
    background: #fff;
    padding: 30px;
}

.cbc-plan-form {
    max-width: 100%;
}

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

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

.cbc-form-row input[type="text"],
.cbc-form-row input[type="number"],
.cbc-form-row input[type="date"],
.cbc-form-row select,
.cbc-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
    background: #fff;
}

.cbc-form-row input:focus,
.cbc-form-row select:focus,
.cbc-form-row textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cbc-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.required {
    color: #e74c3c;
    margin-left: 3px;
}

.cbc-generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cbc-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cbc-generate-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-loader {
    color: white;
}

.btn-loader .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.cbc-loading {
    text-align: center;
    padding: 50px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

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

.cbc-loading p {
    margin: 10px 0 0 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
}

.cbc-loading-note {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 10px;
    font-weight: normal;
}

.cbc-result {
    border-top: 1px solid #e9ecef;
}

.cbc-result-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.cbc-result-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.cbc-result-actions {
    display: flex;
    gap: 10px;
}

.cbc-action-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    color: #495057;
}

.cbc-action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.cbc-plan-content {
    background: #fff;
    padding: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.cbc-plan-content pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-family: "Courier New", monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3e50;
}

.cbc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 25px;
    margin: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(-5px);
    }
    20% {
        transform: translateX(5px);
    }
    30% {
        transform: translateX(-5px);
    }
    40% {
        transform: translateX(5px);
    }
    50% {
        transform: translateX(-5px);
    }
    60% {
        transform: translateX(5px);
    }
    70% {
        transform: translateX(-5px);
    }
    80% {
        transform: translateX(5px);
    }
    90% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

.cbc-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 25px;
    margin: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.cbc-temp-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

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

.cbc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.cbc-stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cbc-stat-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.cbc-stat-card .status {
    font-size: 18px;
    font-weight: 600;
}

.cbc-stat-card .status.success {
    color: #27ae60;
}

.cbc-stat-card .status.error {
    color: #e74c3c;
}

.cbc-stat-card .status.warning {
    color: #f39c12;
}

.actions-grid {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.cbc-shortcode-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
}

.cbc-shortcode-info code {
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    margin: 10px 0;
    font-size: 16px;
    font-family: monospace;
}

.cbc-help-box {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 25px;
    margin-top: 30px;
    border-radius: 0 10px 10px 0;
}

.cbc-help-box ol {
    margin: 15px 0 0 20px;
    line-height: 1.8;
}

.cbc-database-info {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* PRINT STYLES - FIXED AND VALIDATED */
@media print {
    .cbc-form-container,
    .cbc-result-header button,
    .cbc-generate-btn,
    .cbc-action-btn,
    .cbc-header,
    .cbc-loading,
    .cbc-error {
        display: none !important;
    }
    
    .cbc-plan-content {
        max-height: none;
        overflow: visible;
        padding: 0;
    }
    
    .cbc-plan-content pre {
        border: none;
        padding: 0;
        white-space: pre-wrap;
        word-wrap: break-word;
        background: transparent;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .cbc-result {
        border: none;
    }
    
    .cbc-result-header {
        display: none;
    }
    
    .cbc-planner-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    .cbc-header {
        padding: 20px;
    }
    
    .cbc-header h2 {
        font-size: 24px;
    }
    
    .cbc-form-container {
        padding: 20px;
    }
    
    .cbc-two-col {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cbc-result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cbc-result-actions {
        justify-content: center;
    }
    
    .cbc-action-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .cbc-plan-content pre {
        font-size: 12px;
        padding: 15px;
    }
    
    .cbc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        flex-direction: column;
    }
    
    .actions-grid .button {
        width: 100%;
        text-align: center;
    }
}
/* Export Format Selector Styling */
.cbc-export-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.cbc-export-section h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.cbc-export-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cbc-export-dropdown {
    flex: 1;
    min-width: 250px;
    padding: 10px 12px;
    border: 2px solid #3498db;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: #2c3e50;
    cursor: pointer;
    transition: border-color 0.3s;
}

.cbc-export-dropdown:hover {
    border-color: #2980b9;
}

.cbc-export-dropdown:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cbc-export-button {
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.cbc-export-button:hover {
    background-color: #229954;
}

.cbc-export-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.cbc-export-hint {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 12px;
    font-style: italic;
}
