/* Galleria Italia Trade Form - Frontend Styles */

/* Color Variables */
:root {
    --gitf-primary: #C9A368;
    --gitf-secondary: #2B2B2B;
    --gitf-background: #FAF9F6;
    --gitf-white: #FFFFFF;
    --gitf-error: #dc3545;
    --gitf-success: #28a745;
    --gitf-warning: #ffc107;
    --gitf-info: #17a2b8;
    --gitf-light-gray: #f8f9fa;
    --gitf-border: #dee2e6;
    --gitf-text: #333333;
    --gitf-text-muted: #6c757d;
}

/* Form Container */
.gitf-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--gitf-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gitf-form-header {
    background: linear-gradient(135deg, var(--gitf-primary), #d4b373);
    color: var(--gitf-white);
    padding: 30px;
    text-align: center;
}

.gitf-form-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Progress Bar */
.gitf-progress-bar {
    display: flex;
    background: var(--gitf-light-gray);
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--gitf-border);
}

.gitf-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    position: relative;
    background: var(--gitf-light-gray);
    color: var(--gitf-text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gitf-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: var(--gitf-border);
}

.gitf-progress-step.active {
    background: var(--gitf-primary);
    color: var(--gitf-white);
}

.gitf-progress-step.completed {
    background: var(--gitf-success);
    color: var(--gitf-white);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.gitf-progress-step.active .step-number,
.gitf-progress-step.completed .step-number {
    background: rgba(255, 255, 255, 0.3);
}

.step-title {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Form Steps */
.gitf-trade-form {
    padding: 40px;
}

.gitf-form-step {
    display: none;
}

.gitf-form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gitf-form-step h3 {
    color: var(--gitf-secondary);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gitf-primary);
}

.gitf-form-step h4 {
    color: var(--gitf-secondary);
    font-size: 18px;
    margin: 25px 0 15px 0;
}

/* Form Layout */
.gitf-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px -10px;
}

.gitf-form-group {
    padding: 0 10px;
    margin-bottom: 20px;
}

.gitf-col-12 { flex: 0 0 100%; max-width: 100%; }
.gitf-col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.gitf-col-6 { flex: 0 0 50%; max-width: 50%; }
.gitf-col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }

/* Form Elements */
.gitf-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--gitf-secondary);
}

.gitf-form-group input[type="text"],
.gitf-form-group input[type="email"],
.gitf-form-group input[type="tel"],
.gitf-form-group input[type="url"],
.gitf-form-group select,
.gitf-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gitf-border);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--gitf-white);
}

.gitf-form-group input:focus,
.gitf-form-group select:focus,
.gitf-form-group textarea:focus {
    outline: none;
    border-color: var(--gitf-primary);
    box-shadow: 0 0 0 3px rgba(201, 163, 104, 0.1);
}

.gitf-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.gitf-form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed var(--gitf-border);
    border-radius: 5px;
    background: var(--gitf-light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gitf-form-group input[type="file"]:hover {
    border-color: var(--gitf-primary);
    background: rgba(201, 163, 104, 0.05);
}

.gitf-file-info {
    margin-top: 5px;
}

.gitf-file-info small {
    color: var(--gitf-text-muted);
    font-size: 12px;
}

/* Checkboxes and Radio Buttons */
.gitf-checkbox-group,
.gitf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gitf-checkbox-label,
.gitf-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.gitf-checkbox-label:hover,
.gitf-radio-label:hover {
    background: var(--gitf-light-gray);
}

.gitf-checkbox-label input[type="checkbox"],
.gitf-radio-label input[type="radio"] {
    margin: 0;
    width: auto;
    flex-shrink: 0;
    margin-top: 2px;
}

.gitf-consent-label {
    background: var(--gitf-light-gray);
    border: 1px solid var(--gitf-border);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.gitf-consent-label a {
    color: var(--gitf-primary);
    text-decoration: none;
}

.gitf-consent-label a:hover {
    text-decoration: underline;
}

/* Required Field Indicator */
.required {
    color: var(--gitf-error);
    font-weight: bold;
}

/* Error Messages */
.gitf-field-error {
    color: var(--gitf-error);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

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

.gitf-form-group.has-error input,
.gitf-form-group.has-error select,
.gitf-form-group.has-error textarea {
    border-color: var(--gitf-error);
}

/* Messages */
.gitf-messages {
    margin: 20px 40px;
    padding: 15px;
    border-radius: 5px;
    font-weight: 500;
}

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

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

/* Conditional Sections */
.gitf-conditional-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--gitf-light-gray);
    border-radius: 5px;
    border-left: 4px solid var(--gitf-primary);
}

/* Reference Sections */
.gitf-reference-section {
    background: var(--gitf-light-gray);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid var(--gitf-primary);
}

.gitf-reference-section h4 {
    margin-top: 0;
    color: var(--gitf-primary);
}

/* Consent Section */
.gitf-consent-section {
    background: var(--gitf-background);
    padding: 25px;
    border-radius: 5px;
    border: 2px solid var(--gitf-primary);
}

/* Form Navigation */
.gitf-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--gitf-border);
}

.gitf-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.gitf-btn-primary:hover {
    background: #b8935a;
    transform: translateY(-1px);
}

.gitf-btn-secondary {
    background: var(--gitf-text-muted);
    color: var(--gitf-white);
}

.gitf-btn-secondary:hover {
    background: #5a6268;
}

.gitf-btn-success {
    background: var(--gitf-success);
    color: var(--gitf-white);
    font-size: 18px;
    padding: 15px 40px;
}

.gitf-btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.gitf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.gitf-loading {
    position: relative;
    pointer-events: none;
}

.gitf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--gitf-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .gitf-form-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .gitf-trade-form {
        padding: 20px;
    }
    
    .gitf-form-header {
        padding: 20px;
    }
    
    .gitf-form-header h2 {
        font-size: 22px;
    }
    
    .gitf-progress-bar {
        flex-wrap: wrap;
    }
    
    .gitf-progress-step {
        flex: 1 1 50%;
        padding: 15px 5px;
    }
    
    .step-title {
        font-size: 11px;
    }
    
    .gitf-col-6,
    .gitf-col-4,
    .gitf-col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .gitf-form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .gitf-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .gitf-progress-step {
        flex: 1 1 100%;
    }
    
    .gitf-form-step h3 {
        font-size: 20px;
    }
    
    .gitf-form-step h4 {
        font-size: 16px;
    }
}
