/**
 * Creator Stack Platform Styles
 * Frontend styles for the creator platform
 */

/* =============================================================================
   GENERAL STYLES
   ============================================================================= */

.cs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Form Styles */
.cs-form-group {
    margin-bottom: 20px;
}

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

.cs-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.cs-form-control:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.cs-form-row {
    display: flex;
    gap: 20px;
}

.cs-form-row .cs-form-group {
    flex: 1;
}

.cs-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.cs-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.cs-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.cs-form-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Button Styles */
.cs-button,
.cs-submit-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cs-button:hover,
.cs-submit-btn:hover {
    background: #005a87;
    color: white;
}

.cs-button-small {
    padding: 8px 16px;
    font-size: 12px;
}

.cs-button-secondary {
    background: #666;
}

.cs-button-secondary:hover {
    background: #444;
}

/* =============================================================================
   SUBMISSION FORMS
   ============================================================================= */

.cs-submission-form,
.cs-metadata-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.cs-submission-form h3,
.cs-metadata-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* Multi-step form styles */
.cs-metadata-form .step {
    display: none;
}

.cs-metadata-form .step.active {
    display: block;
}

.progress-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #007cba 0%, #00a0d2 100%);
    transition: width 0.3s ease;
    width: 12.5%; /* Starting at step 1 of 8 */
}

/* =============================================================================
   TABLES
   ============================================================================= */

.cs-submissions-table,
.cs-earnings-table,
.cs-metadata-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cs-submissions-table th,
.cs-earnings-table th,
.cs-metadata-table th {
    background: #2c3e50;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.cs-submissions-table td,
.cs-earnings-table td,
.cs-metadata-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.cs-submissions-table tbody tr:hover,
.cs-earnings-table tbody tr:hover,
.cs-metadata-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.cs-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

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

.status-paid {
    background: #cce5ff;
    color: #004085;
}

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

/* =============================================================================
   DASHBOARD
   ============================================================================= */

.cs-dashboard {
    margin: 20px 0;
}

.cs-dashboard-header h1 {
    margin: 0 0 30px 0;
    color: #2c3e50;
    font-size: 28px;
}

.cs-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cs-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #007cba;
}

.cs-stat-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

/* Widget Styles */
.cs-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.cs-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.earnings-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.earnings-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.earnings-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

.earnings-value.paid {
    color: #28a745;
}

.earnings-value.unpaid {
    color: #ffc107;
}

/* =============================================================================
   EARNINGS DISPLAYS
   ============================================================================= */

.cs-earnings-total,
.cs-earnings-unpaid {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-earnings-label {
    font-weight: bold;
    color: #2c3e50;
}

.cs-earnings-amount {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

.cs-earnings-amount.unpaid {
    color: #ffc107;
}

.cs-monthly-earnings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-monthly-earnings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cs-monthly-earnings-item:last-child {
    border-bottom: none;
}

.cs-month {
    font-weight: bold;
    color: #2c3e50;
}

.cs-amount {
    font-weight: bold;
    color: #007cba;
}

/* =============================================================================
   LOGIN FORM
   ============================================================================= */

.cs-login-form {
    max-width: 400px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cs-login-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
}

.cs-login-links {
    text-align: center;
    margin-top: 20px;
}

.cs-login-links a {
    color: #007cba;
    text-decoration: none;
}

.cs-login-links a:hover {
    text-decoration: underline;
}

/* =============================================================================
   MESSAGES
   ============================================================================= */

.cs-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.cs-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

.cs-login-required {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.cs-no-submissions,
.cs-no-earnings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* =============================================================================
   TAX DOCUMENTS
   ============================================================================= */

.cs-tax-docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-tax-docs-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cs-tax-docs-list li:last-child {
    border-bottom: none;
}

.cs-tax-docs-list a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.cs-tax-docs-list a:hover {
    text-decoration: underline;
}

/* =============================================================================
   SUBMISSION METADATA
   ============================================================================= */

.cs-submission-metadata {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.cs-submission-metadata h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.submission-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submission-details li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.submission-details li:last-child {
    border-bottom: none;
}

.submission-download {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.submission-download:hover {
    text-decoration: underline;
}

.back-to-dashboard {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.back-to-dashboard:hover {
    background: #005a87;
    color: white;
}

/* =============================================================================
   ADMIN STYLES
   ============================================================================= */

.cs-bubble {
    background: #d63638;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 14px;
    text-align: center;
    text-decoration: none;
}

.cs-bubble:hover {
    color: white;
    background: #a00;
}

.cs-submission-notification {
    color: #d63638;
    font-weight: bold;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .cs-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cs-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .earnings-grid {
        grid-template-columns: 1fr;
    }
    
    .cs-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .cs-submissions-table,
    .cs-earnings-table,
    .cs-metadata-table {
        font-size: 12px;
    }
    
    .cs-submissions-table td,
    .cs-earnings-table td,
    .cs-metadata-table td {
        padding: 8px 4px;
    }
    
    .cs-container {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .cs-submission-form,
    .cs-metadata-form,
    .cs-login-form {
        padding: 20px;
        margin: 10px;
    }
    
    .cs-stat-number {
        font-size: 24px;
    }
    
    .cs-earnings-total,
    .cs-earnings-unpaid {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cs-earnings-amount {
        font-size: 20px;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.cs-text-center { text-align: center; }
.cs-text-left { text-align: left; }
.cs-text-right { text-align: right; }

.cs-mb-10 { margin-bottom: 10px; }
.cs-mb-20 { margin-bottom: 20px; }
.cs-mb-30 { margin-bottom: 30px; }

.cs-mt-10 { margin-top: 10px; }
.cs-mt-20 { margin-top: 20px; }
.cs-mt-30 { margin-top: 30px; }

.cs-hidden { display: none; }
.cs-visible { display: block; }

.cs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cs-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}