/**
 * CSS за Форма 2 - Multi-step Client Form
 * Бои: #C6B477 и #C5912F
 */

/* Form container styling */
.form-2-container {
    max-width: 700px;
    margin: 40px auto;
}

.form-2-container .form-logo {
    text-align: center;
    margin-bottom: 35px;
}

.form-2-container .form-logo img {
    max-width: 180px;
    height: auto;
}

.form-2-container .form-logo h2 {
    text-align: center;
    color: #333;
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 26px;
    font-weight: 400;
}

.form-2-container .form-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

/* Progress bar with dots */
.form-progress {
    margin-bottom: 50px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C6B477 0%, #C5912F 100%);
    transition: width 0.4s ease;
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.progress-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8e8e8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dots .dot.active {
    background: #C5912F;
    transform: scale(1.3);
}

.progress-dots .dot.completed {
    background: #46b450;
}

/* Multi-step form */
.multi-step-form .form-step {
    display: none;
}

.multi-step-form .form-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease;
}

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

.step-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 400;
    text-align: center;
}

.step-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Phone input styling - МАКСИМАЛНА СПЕЦИФИЧНОСТ */
.form-2-container .form-field .phone-input {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
}

.form-2-container .form-field .phone-input select.phone-country-code,
.form-2-container .form-field .phone-input .phone-country-code {
    flex: 0 0 60px !important;
    width: 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
    padding: 12px 8px !important;
    border: 1px solid #ddd !important;
    border-right: none !important;
    border-radius: 4px 0 0 4px !important;
    font-size: 13px !important;
    background: #fafafa !important;
    font-weight: 400 !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23999' d='M4 6L0 2h8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center right 6px !important;
    padding-right: 18px !important;
    line-height: 1.5 !important;
}

.form-2-container .form-field .phone-input select.phone-country-code:hover,
.form-2-container .form-field .phone-input .phone-country-code:hover {
    background-color: #f0f0f0 !important;
    border-color: #bbb !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23999' d='M4 6L0 2h8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center right 6px !important;
}

.form-2-container .form-field .phone-input select.phone-country-code:focus,
.form-2-container .form-field .phone-input .phone-country-code:focus {
    border-color: #C6B477 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(198, 180, 119, 0.1) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23999' d='M4 6L0 2h8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center right 6px !important;
}

.form-2-container .form-field .phone-input input[type="tel"] {
    flex: 1 !important;
    width: auto !important;
    max-width: none !important;
    padding: 12px 16px !important;
    border: 1px solid #ddd !important;
    border-left: none !important;
    border-radius: 0 4px 4px 0 !important;
    font-size: 15px !important;
    color: #666 !important;
    background: #fff !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
}

.form-2-container .form-field .phone-input input[type="tel"]:hover {
    border-color: #bbb !important;
}

.form-2-container .form-field .phone-input input[type="tel"]:focus {
    border-color: #C6B477 !important;
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 0 0 2px rgba(198, 180, 119, 0.1) !important;
}

/* Error state */
.form-2-container .form-field.error .phone-input select.phone-country-code,
.form-2-container .form-field.error .phone-input .phone-country-code {
    border-color: #dc3232 !important;
    background: #fff5f5 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23999' d='M4 6L0 2h8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center right 6px !important;
}

.form-2-container .form-field.error .phone-input input[type="tel"] {
    border-color: #dc3232 !important;
    background: #fff5f5 !important;
}

/* Focus within */
.form-2-container .form-field .phone-input:focus-within select.phone-country-code,
.form-2-container .form-field .phone-input:focus-within .phone-country-code {
    border-color: #C6B477 !important;
}

.form-2-container .form-field .phone-input:focus-within input[type="tel"] {
    border-color: #C6B477 !important;
}

/* Radio buttons styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    font-size: 15px;
}

.radio-label:hover {
    border-color: #C6B477;
    background: #faf9f5;
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C5912F;
}

.radio-label:has(input:checked) {
    border-color: #C6B477;
    background: #faf9f5;
    font-weight: 500;
}

/* Completion message */
.completion-message {
    text-align: center;
    margin-bottom: 30px;
}

.completion-message .step-title {
    color: #C5912F;
    font-size: 32px;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* Navigation buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

.btn-prev,
.btn-next,
.submit-button {
    padding: 14px 35px;
    border: 1px solid #C6B477;
    background: #ffffff;
    color: #C5912F;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-prev:hover,
.btn-next:hover {
    background: #C5912F;
    color: #ffffff;
    border-color: #C5912F;
    transform: translateY(-2px);
}

.btn-prev {
    background: #f5f5f5;
    border-color: #ddd;
    color: #666;
}

.btn-prev:hover {
    background: #e8e8e8;
    border-color: #ccc;
    color: #333;
}

.btn-next {
    margin-left: auto;
}

.submit-button {
    background: #C5912F;
    color: #ffffff;
    border-color: #C5912F;
    margin-left: auto;
}

.submit-button:hover {
    background: #B07F26;
    border-color: #B07F26;
}

.btn-prev:disabled,
.btn-next:disabled,
.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.submit-button.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Form field customization for form-2 */
.form-2-container .form-field input[type="text"],
.form-2-container .form-field input[type="email"],
.form-2-container .form-field input[type="number"],
.form-2-container .form-field input[type="date"],
.form-2-container .form-field textarea {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 14px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-2-container .form-field input:focus,
.form-2-container .form-field textarea:focus {
    border-color: #C6B477;
    box-shadow: 0 0 0 3px rgba(198, 180, 119, 0.1);
    outline: none;
}

.form-2-container .form-field label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

/* Number input styling */
.form-2-container input[type="number"] {
    font-weight: 400;
    background: #fafafa;
}

.form-2-container input[type="number"]:focus {
    background: #ffffff;
}

/* Date input styling */
.form-2-container input[type="date"] {
    background: #fafafa;
}

.form-2-container input[type="date"]:focus {
    background: #ffffff;
}

/* Validation states */
.form-field.error input,
.form-field.error textarea,
.form-field.error select {
    border-color: #dc3232;
}

.form-field.error .radio-label {
    border-color: #dc3232;
}

.error-message {
    color: #dc3232;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-field.error .error-message {
    display: block;
}

/* Success/Error messages */
.form-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 15px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

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

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

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

/* Submitting state */
.form-2-container.submitting {
    opacity: 0.6;
    pointer-events: none;
}

/* Submitted state */
.form-2-container.submitted {
    border: 2px solid #46b450;
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .form-2-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .form-2-container .form-logo img {
        max-width: 140px;
    }
    
    .step-title {
        font-size: 24px;
    }
    
    .completion-message .step-title {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next,
    .submit-button {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }
    
    /* Phone input responsive */
    .form-2-container .form-field .phone-input select.phone-country-code,
    .form-2-container .form-field .phone-input .phone-country-code {
        width: 55px !important;
        max-width: 55px !important;
        min-width: 55px !important;
        padding: 11px 6px !important;
        font-size: 12px !important;
        background-position: center right 5px !important;
        padding-right: 16px !important;
    }
    
    .form-2-container .form-field .phone-input input[type="tel"] {
        padding: 11px 14px !important;
        font-size: 14px !important;
    }
    
    .radio-label {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .progress-dots .dot {
        width: 10px;
        height: 10px;
    }
}

/* Placeholder styling */
.form-2-container input::placeholder,
.form-2-container textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

.form-2-container .phone-input input[type="tel"]::placeholder {
    color: #ccc !important;
    font-size: 15px !important;
    font-weight: 300 !important;
}

/* Focus visible for accessibility */
.form-2-container input:focus-visible,
.form-2-container textarea:focus-visible,
.form-2-container button:focus-visible {
    outline: 2px solid #C6B477;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .form-navigation,
    .form-message,
    .form-progress {
        display: none;
    }
}

/* Дополнителни override стилови */
.form-2-container .form-field.required .phone-input,
.form-2-container .form-field .phone-input {
    display: flex !important;
    flex-wrap: nowrap !important;
}

.form-2-container .form-field .phone-input > * {
    margin: 0 !important;
}

.form-2-container .phone-input * {
    box-sizing: border-box !important;
}