/**
 * Cyber Security Academy Plugin Styles
 * Version: 2.0.0
 */

/* Reset and Base Styles */
.csa-registration-container *,
.csa-registration-container *::before,
.csa-registration-container *::after {
    box-sizing: border-box;
}

/* Main Container */
.csa-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.csa-registration-header {
    text-align: center;
    margin-bottom: 40px;
}

.csa-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
}

.csa-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* Benefits Section */
.csa-benefits {
    margin-bottom: 40px;
}

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

.csa-benefit-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.csa-benefit-item:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.csa-benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.csa-benefit-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.csa-benefit-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Form Wrapper */
.csa-registration-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

/* Form Styles */
.csa-form {
    width: 100%;
}

.csa-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.csa-form-group {
    margin-bottom: 25px;
    position: relative;
}

.csa-form-group-half {
    flex: 1;
}

.csa-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.csa-required {
    color: #e74c3c;
    font-weight: bold;
}

.csa-form-group input,
.csa-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

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

.csa-form-group input.csa-error,
.csa-form-group select.csa-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.csa-field-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.csa-field-error {
    font-size: 0.85rem;
    color: #e74c3c;
    margin-top: 5px;
    font-weight: 500;
}

/* Checkbox Styles */
.csa-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal !important;
    line-height: 1.5;
}

.csa-checkbox-label input[type="checkbox"] {
    display: none;
}

.csa-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.csa-checkbox-label input[type="checkbox"]:checked + .csa-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.csa-checkbox-label input[type="checkbox"]:checked + .csa-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Button Styles */
.csa-form-actions {
    margin-top: 30px;
    text-align: center;
}

.csa-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.csa-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.csa-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.csa-button-primary:active {
    transform: translateY(0);
}

.csa-button-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    min-width: 200px;
}

.csa-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.csa-button-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.csa-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: csa-spin 1s linear infinite;
}

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

/* Messages */
.csa-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.csa-message.csa-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.csa-message.csa-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.csa-message.csa-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.csa-registration-footer {
    text-align: center;
    margin-top: 30px;
}

.csa-security-note {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.csa-security-icon {
    font-size: 1.1rem;
}

/* Course Access Styles */
.csa-course-access {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.csa-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.csa-course-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.csa-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.csa-course-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.csa-course-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.3rem;
}

.csa-course-card p {
    color: #666;
    margin: 0 0 20px 0;
}

.csa-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.csa-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* Access Denied */
.csa-access-denied {
    text-align: center;
    padding: 40px 20px;
}

.csa-access-denied h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Login Check */
.csa-login-check {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.csa-login-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.csa-login-form h3 {
    text-align: center;
    margin: 0 0 10px 0;
    color: #333;
}

.csa-login-form p {
    text-align: center;
    color: #666;
    margin: 0 0 25px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csa-registration-container {
        padding: 15px;
    }
    
    .csa-title {
        font-size: 2rem;
    }
    
    .csa-subtitle {
        font-size: 1.1rem;
    }
    
    .csa-registration-form-wrapper {
        padding: 25px;
    }
    
    .csa-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .csa-benefits-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .csa-benefit-item {
        padding: 20px;
    }
    
    .csa-course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .csa-title {
        font-size: 1.8rem;
    }
    
    .csa-registration-form-wrapper {
        padding: 20px;
    }
    
    .csa-button-large {
        padding: 14px 24px;
        font-size: 1rem;
        min-width: 180px;
    }
}
