/* SmartPicks Tipster Registration Form Styles */

/* Variables */
:root {
    --sp-primary: #2563eb;
    --sp-primary-dark: #1d4ed8;
    --sp-secondary: #64748b;
    --sp-success: #059669;
    --sp-error: #dc2626;
    --sp-warning: #d97706;
    --sp-info: #0891b2;
    
    --sp-gray-50: #f8fafc;
    --sp-gray-100: #f1f5f9;
    --sp-gray-200: #e2e8f0;
    --sp-gray-300: #cbd5e1;
    --sp-gray-400: #94a3b8;
    --sp-gray-500: #64748b;
    --sp-gray-600: #475569;
    --sp-gray-700: #334155;
    --sp-gray-800: #1e293b;
    --sp-gray-900: #0f172a;
    
    --sp-border-radius: 8px;
    --sp-border-radius-lg: 12px;
    --sp-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --sp-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --sp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --sp-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Base Styles */
.smartpicks-tipster-registration {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: var(--sp-font-family);
    line-height: 1.6;
    color: var(--sp-gray-700);
}

/* Header */
.sp-registration-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sp-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sp-gray-900);
    margin-bottom: 0.5rem;
}

.sp-subtitle {
    font-size: 1.125rem;
    color: var(--sp-gray-600);
    margin: 0;
}

/* Messages */
.sp-message {
    padding: 1rem 1.5rem;
    border-radius: var(--sp-border-radius);
    margin-bottom: 2rem;
    border: 1px solid;
}

.sp-message--success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: var(--sp-success);
}

.sp-message--error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: var(--sp-error);
}

.sp-message__content h3 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.sp-message__content p {
    margin: 0;
}

/* Auth Required */
.sp-auth-required {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.sp-auth-card {
    background: white;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--sp-shadow);
    max-width: 400px;
    width: 100%;
}

.sp-auth-card h2 {
    color: var(--sp-gray-900);
    margin-bottom: 0.5rem;
}

.sp-auth-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.sp-auth-divider {
    color: var(--sp-gray-400);
    font-size: 0.875rem;
}

/* Status Cards */
.sp-already-tipster,
.sp-pending-application {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.sp-status-card {
    background: white;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--sp-shadow);
    max-width: 500px;
    width: 100%;
}

.sp-status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--sp-success);
}

.sp-status-icon--pending {
    color: var(--sp-warning);
}

.sp-status-card h2 {
    color: var(--sp-gray-900);
    margin-bottom: 1rem;
}

.sp-application-details {
    background: var(--sp-gray-50);
    border-radius: var(--sp-border-radius);
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
}

/* Form Styles */
.sp-tipster-form {
    background: white;
    border-radius: var(--sp-border-radius-lg);
    box-shadow: var(--sp-shadow);
    overflow: hidden;
}

.sp-form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--sp-gray-200);
}

.sp-form-section:last-child {
    border-bottom: none;
}

.sp-section-header {
    margin-bottom: 2rem;
}

.sp-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sp-gray-900);
    margin-bottom: 0.5rem;
}

.sp-section-description {
    color: var(--sp-gray-600);
    margin: 0;
}

/* Form Grid */
.sp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Form Groups */
.sp-form-group {
    margin-bottom: 1.5rem;
}

.sp-form-group--required .sp-label::after {
    content: ' *';
    color: var(--sp-error);
}

/* Labels */
.sp-label {
    display: block;
    font-weight: 500;
    color: var(--sp-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Input Styles */
.sp-input,
.sp-textarea,
.sp-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--sp-gray-300);
    border-radius: var(--sp-border-radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.sp-input:focus,
.sp-textarea:focus,
.sp-select:focus {
    outline: none;
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.sp-input:invalid,
.sp-textarea:invalid,
.sp-select:invalid {
    border-color: var(--sp-error);
}

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

/* File Upload */
.sp-file-upload {
    position: relative;
}

.sp-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sp-file-upload-area {
    border: 2px dashed var(--sp-gray-300);
    border-radius: var(--sp-border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sp-file-upload-area:hover {
    border-color: var(--sp-primary);
    background: var(--sp-gray-50);
}

.sp-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sp-upload-text {
    font-weight: 500;
    color: var(--sp-gray-700);
    margin-bottom: 0.25rem;
}

.sp-upload-hint {
    font-size: 0.75rem;
    color: var(--sp-gray-500);
    margin: 0;
}

.sp-file-preview {
    margin-top: 1rem;
    display: none;
}

.sp-file-preview.has-file {
    display: block;
}

.sp-file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--sp-border-radius);
    box-shadow: var(--sp-shadow-sm);
}

/* Checkbox Styles */
.sp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.sp-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sp-checkbox-mark {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--sp-gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.sp-checkbox:checked + .sp-checkbox-mark {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
}

.sp-checkbox:checked + .sp-checkbox-mark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.sp-checkbox-text {
    flex: 1;
    color: var(--sp-gray-700);
}

.sp-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

/* Field Help */
.sp-field-help {
    display: block;
    font-size: 0.75rem;
    color: var(--sp-gray-500);
    margin-top: 0.25rem;
}

/* Field Errors */
.sp-field-error {
    color: var(--sp-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.sp-field-error.show {
    display: block;
}

/* Character Counter */
.sp-character-count {
    font-size: 0.75rem;
    color: var(--sp-gray-500);
    text-align: right;
    margin-top: 0.25rem;
}

.sp-character-count.over-limit {
    color: var(--sp-error);
}

/* Legal Agreements */
.sp-legal-agreements {
    background: var(--sp-gray-50);
    border-radius: var(--sp-border-radius);
    padding: 1.5rem;
}

.sp-legal-agreements .sp-checkbox-label {
    background: white;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.sp-legal-agreements .sp-checkbox-label:hover {
    border-color: var(--sp-gray-300);
}

/* Links */
.sp-link {
    color: var(--sp-primary);
    text-decoration: none;
    font-weight: 500;
}

.sp-link:hover {
    text-decoration: underline;
}

/* Buttons */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--sp-border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sp-btn--primary {
    background: var(--sp-primary);
    color: white;
}

.sp-btn--primary:hover {
    background: var(--sp-primary-dark);
}

.sp-btn--secondary {
    background: white;
    color: var(--sp-gray-700);
    border-color: var(--sp-gray-300);
}

.sp-btn--secondary:hover {
    background: var(--sp-gray-50);
}

.sp-btn--large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

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

.sp-btn-loader {
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: sp-spin 1s linear infinite;
    display: none;
}

.sp-btn.loading .sp-btn-text {
    opacity: 0;
}

.sp-btn.loading .sp-btn-loader {
    display: block;
}

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

/* Form Actions */
.sp-form-actions {
    padding: 2rem;
    background: var(--sp-gray-50);
    text-align: center;
}

.sp-form-disclaimer {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--sp-gray-500);
}

/* Modals */
.sp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.sp-modal.show {
    display: flex;
}

.sp-modal-content {
    background: white;
    border-radius: var(--sp-border-radius-lg);
    box-shadow: var(--sp-shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.sp-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--sp-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-modal-header h3 {
    margin: 0;
    color: var(--sp-gray-900);
}

.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--sp-gray-500);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.sp-modal-close:hover {
    background: var(--sp-gray-100);
    color: var(--sp-gray-700);
}

.sp-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smartpicks-tipster-registration {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .sp-title {
        font-size: 2rem;
    }
    
    .sp-form-section {
        padding: 1.5rem;
    }
    
    .sp-form-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-auth-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sp-auth-divider {
        display: none;
    }
    
    .sp-modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .sp-title {
        font-size: 1.75rem;
    }
    
    .sp-subtitle {
        font-size: 1rem;
    }
    
    .sp-form-section {
        padding: 1rem;
    }
    
    .sp-form-actions {
        padding: 1.5rem;
    }
}