/**
 * Style publiczne (frontend)
 */

/* Reset i podstawy */
.scc-competition-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.scc-competition-page *,
.scc-competition-page *::before,
.scc-competition-page *::after {
    box-sizing: border-box;
}

/* Nagłówek zawodów */
.scc-competition-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.scc-competition-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
}

.scc-competition-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.scc-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.scc-meta-icon {
    font-size: 18px;
}

.scc-meta-label {
    opacity: 0.8;
}

.scc-meta-value {
    font-weight: 600;
}

.scc-competition-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    line-height: 1.6;
}

/* Zakładki */
.scc-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
}

.scc-tab {
    padding: 12px 24px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.scc-tab:hover {
    background: #e8e8e8;
    color: #333;
}

.scc-tab-active {
    background: #fff;
    color: #2c3e50;
    border: 2px solid #e0e0e0;
    border-bottom-color: #fff;
}

.scc-tab-content {
    display: none;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 30px;
}

.scc-tab-content-active {
    display: block;
}

/* Formularze */
.scc-form {
    max-width: 100%;
}

.scc-form-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.scc-form-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.scc-form-section {
    margin-bottom: 25px;
}

.scc-section-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #34495e;
    font-weight: 600;
}

.scc-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.scc-form-field {
    flex: 1;
    min-width: 200px;
    margin-bottom: 15px;
}

.scc-form-field-half {
    flex: 0 0 calc(50% - 7.5px);
}

.scc-form-field-third {
    flex: 0 0 calc(33.333% - 10px);
}

.scc-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.scc-form-field input,
.scc-form-field select,
.scc-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.scc-form-field input:focus,
.scc-form-field select:focus,
.scc-form-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.scc-field-hint {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #888;
}

.required {
    color: #e74c3c;
}

/* Konkurencje */
.scc-disciplines-list {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.scc-discipline-item {
    border-bottom: 1px solid #e0e0e0;
}

.scc-discipline-item:last-child {
    border-bottom: none;
}

.scc-discipline-label {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.scc-discipline-label:hover {
    background: #f8f9fa;
}

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

.scc-discipline-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scc-discipline-label input[type="checkbox"]:checked + .scc-discipline-checkbox {
    background: #27ae60;
    border-color: #27ae60;
}

.scc-discipline-label input[type="checkbox"]:checked + .scc-discipline-checkbox::after {
    content: "✓";
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.scc-discipline-info {
    flex: 1;
}

.scc-discipline-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.scc-discipline-desc {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
}

.scc-discipline-price {
    font-weight: 700;
    color: #27ae60;
    font-size: 16px;
    white-space: nowrap;
}

.scc-total-price {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.scc-total-label {
    font-weight: 600;
    color: #2c3e50;
}

.scc-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

/* Zgody */
.scc-consent-item {
    margin-bottom: 12px;
}

.scc-consent-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.scc-consent-item input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Przyciski */
.scc-form-actions {
    margin-top: 25px;
    text-align: center;
}

.scc-submit-btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.scc-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.scc-verify-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.scc-verify-btn:hover {
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.scc-btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scc-btn-secondary:hover {
    background: #bdc3c7;
}

/* Sukces rejestracji */
.scc-success-message {
    text-align: center;
    padding: 40px;
}

.scc-success-icon {
    width: 80px;
    height: 80px;
    background: #27ae60;
    color: #fff;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.scc-success-message h3 {
    color: #27ae60;
    margin-bottom: 15px;
}

.scc-verification-code-display {
    background: #2c3e50;
    color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 3px;
    display: inline-block;
    margin: 15px 0;
}

.scc-success-info {
    color: #666;
    font-size: 14px;
    max-width: 500px;
    margin: 20px auto 0;
}

/* Weryfikacja - input kodu */
.scc-code-input {
    font-family: 'Courier New', monospace;
    font-size: 20px !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
}

/* Wynik weryfikacji */
.scc-verification-result,
.scc-verification-error {
    padding: 30px;
}

.scc-result-header {
    text-align: center;
    margin-bottom: 25px;
}

.scc-result-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 15px;
}

.scc-result-success {
    background: #27ae60;
    color: #fff;
}

.scc-result-error {
    background: #e74c3c;
    color: #fff;
}

.scc-result-header h3 {
    margin: 0;
    color: #2c3e50;
}

.scc-participant-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.scc-details-table {
    width: 100%;
    border-collapse: collapse;
}

.scc-details-table th,
.scc-details-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.scc-details-table th {
    width: 40%;
    color: #7f8c8d;
    font-weight: 600;
}

.scc-details-table td {
    color: #2c3e50;
    font-weight: 500;
}

.scc-details-table tr:last-child th,
.scc-details-table tr:last-child td {
    border-bottom: none;
}

.scc-result-actions {
    text-align: center;
    margin-top: 25px;
}

.scc-error-message {
    text-align: center;
    color: #e74c3c;
    margin-bottom: 20px;
}

/* Powiadomienia */
.scc-notice {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.scc-notice h3 {
    margin: 0 0 10px 0;
}

.scc-notice p {
    margin: 0;
}

.scc-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

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

.scc-error {
    color: #e74c3c;
    padding: 15px;
    background: #fdf2f2;
    border-radius: 6px;
    text-align: center;
}

/* Responsywność */
@media screen and (max-width: 768px) {
    .scc-competition-page {
        padding: 10px;
    }
    
    .scc-competition-header {
        padding: 20px;
    }
    
    .scc-competition-title {
        font-size: 22px;
    }
    
    .scc-competition-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .scc-tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }
    
    .scc-tab {
        border-radius: 0;
        margin-bottom: 0;
        border: 2px solid #e0e0e0;
        border-bottom: none;
    }
    
    .scc-tab:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .scc-tab-active {
        border-bottom: 2px solid #e0e0e0;
    }
    
    .scc-tab-content {
        border-radius: 0 0 8px 8px;
        padding: 20px;
    }
    
    .scc-form-field-half,
    .scc-form-field-third {
        flex: 0 0 100%;
    }
    
    .scc-discipline-label {
        flex-wrap: wrap;
    }
    
    .scc-discipline-info {
        flex: 0 0 calc(100% - 40px);
        order: 1;
    }
    
    .scc-discipline-price {
        flex: 0 0 100%;
        order: 2;
        margin-top: 10px;
        padding-left: 40px;
    }
    
    .scc-verification-code-display {
        font-size: 18px;
        padding: 15px 20px;
        letter-spacing: 1px;
    }
    
    .scc-details-table th,
    .scc-details-table td {
        display: block;
        width: 100%;
        padding: 8px 15px;
    }
    
    .scc-details-table th {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .scc-details-table td {
        padding-top: 0;
    }
}


/* Regulamin */
.scc-regulations-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.scc-regulations-box h1,
.scc-regulations-box h2,
.scc-regulations-box h3,
.scc-regulations-box h4 {
    color: #2c3e50;
    margin-top: 15px;
    margin-bottom: 10px;
}

.scc-regulations-box h1:first-child,
.scc-regulations-box h2:first-child,
.scc-regulations-box h3:first-child {
    margin-top: 0;
}

.scc-regulations-box p {
    margin-bottom: 10px;
}

.scc-regulations-box ul,
.scc-regulations-box ol {
    padding-left: 25px;
    margin-bottom: 10px;
}

/* Błędy walidacji */
.scc-field-error {
    color: #e74c3c !important;
    font-weight: 600;
}

.scc-field-invalid {
    border-color: #e74c3c !important;
    background-color: #fdf2f2 !important;
}

.scc-field-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Komunikaty */
.scc-notice {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.scc-notice-info {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    color: #2980b9;
}

.scc-notice-warning {
    background: #fef9e7;
    border-left: 4px solid #f1c40f;
    color: #9a7b0a;
}

.scc-notice-success {
    background: #e8f8f0;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

.scc-notice-error {
    background: #fdf2f2;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}
