/* TK Racing Form Styles - Matching Original Design */

.tk-racing-form-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #fff;
}

.tk-racing-form {
    background: #fff;
    border: 2px solid #000;
    padding: 0;
}

/* Header Section */
.form-header {
    background: #000;
    color: #fff;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 2px solid #000;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    margin: 0;
}

/* Form Sections */
.form-section {
    border-bottom: 1px solid #000;
    padding: 15px 20px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 10px;
    border: 1px solid #000;
    background: #fff;
    font-size: 12px;
    color: #000;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    background: #f9f9f9;
}

.form-group input[type="number"] {
    text-align: center;
    font-weight: bold;
}

/* Disk Diagram Section */
.disk-diagram-section {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #000;
    background: #f9f9f9;
}

.disk-image {
    max-width: 100%;
}

.disk-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

/* Checkboxes Section */
.checkboxes-section {
    background: #f9f9f9;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    min-width: 100px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #000;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.checkbox-item span {
    font-size: 12px;
    color: #000;
}

/* Measurements List */
.measurements-section {
    background: #f0f0f0;
}

.measurements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.measurement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.measurement-label {
    font-size: 12px;
    color: #000;
    min-width: 330px;
    flex-shrink: 0;
}

.measurement-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #000;
    background: #fff;
    font-size: 12px;
    text-align: right;
    font-weight: bold;
    min-width: 80px;
    max-width: 80px;
}

.measurement-unit {
    font-size: 12px;
    color: #000;
    margin-left: 5px;
}

.measurement-input:focus {
    outline: none;
    border-color: #000;
    background: #f9f9f9;
}

/* Flangia Section */
.flangia-section {
    background: #f9f9f9;
}

/* Notes Section */
.notes-section {
    background: #f9f9f9;
}

.notes-section textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    border: 1px solid #000;
    padding: 10px;
    font-size: 12px;
    font-family: Arial, sans-serif;
}

/* Submit Button */
.form-actions {
    text-align: center;
    padding: 20px;
    background: #000;
}

.btn-submit {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-submit:hover {
    background: #fff;
    color: #000;
    border-color: #000;
}

.btn-submit:disabled {
    background: #666;
    cursor: not-allowed;
    border-color: #666;
}

/* Form Messages */
.form-messages {
    margin-top: 20px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* Loading State */
.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tk-racing-form-container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .measurements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .measurements-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-submit {
        width: 100%;
        min-width: auto;
    }
    
    .form-section {
        padding: 10px 15px;
    }
}

/* Admin Styles */
.tk-racing-submission-data {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
}

.tk-racing-submission-data .form-table {
    background: white;
    border: 1px solid #ddd;
    overflow: hidden;
}

.tk-racing-submission-data .form-table th {
    background: #f1f1f1;
    font-weight: bold;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.tk-racing-submission-data .form-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.tk-racing-submission-actions {
    text-align: center;
}

.tk-racing-submission-actions p {
    margin: 10px 0;
}

.tk-racing-submission-actions button {
    width: 100%;
    margin-top: 10px;
}

/* Login Required Message */
.tk-racing-login-required {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.login-message {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 40px;
}

.message-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.message-text {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.login-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tk-racing-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tk-racing-btn-primary {
    background: #007cba;
    color: #fff;
}

.tk-racing-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.tk-racing-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.tk-racing-btn-secondary:hover {
    background: #5a6268;
    color: #fff;
}

/* User Info in Form Header */
.user-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.user-label {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 5px;
}

.user-email {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* Section Headers */
.section-header {
    background: #f0f0f0;
    border: 2px solid #000;
    margin: 20px 0 10px 0;
}

.section-header .section-title {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Conditional Form Sections */
#form-details {
    transition: all 0.3s ease;
}

#anteriore-section,
#posteriore-section {
    border: 2px solid #000;
    margin: 10px 0;
    background: #fff;
}

#anteriore-section .section-header {
    background: #e8f4f8;
    border: none;
    margin: 0;
}

#posteriore-section .section-header {
    background: #f8e8e8;
    border: none;
    margin: 0;
}
