/* Custom Forms SMS - Form Styles */

.cfs-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px 0; /* Уменьшен с 20px до 15px */
}

.cfs-contact-form {
    background: transparent;
    padding: 0;
}

/* Form Groups */
.cfs-form-group {
    margin-bottom: 15px; /* Уменьшен с 20px до 15px */
    position: relative;
}

/* Labels */
.cfs-label {
    display: block;
    color: #2e3a5f;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px; /* Уменьшен с 8px до 6px */
}

.cfs-required {
    color: #ff0000;
    font-weight: normal;
}

/* Inputs */
.cfs-input,
.cfs-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cfs-input:focus,
.cfs-textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.cfs-input.error,
.cfs-textarea.error {
    border-color: #ff0000;
}

/* Phone Input Wrapper */
.cfs-phone-wrapper {
    display: flex;
    align-items: center;
}

.cfs-phone-prefix {
    padding: 12px 15px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.cfs-phone-input {
    border-radius: 0 4px 4px 0 !important;
    flex: 1;
}

/* Verification Section */
.cfs-verification-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px; /* Уменьшен с 20px до 15px */
    margin-top: 15px; /* Уменьшен с 20px до 15px */
}

/* Send SMS Button */
.cfs-send-sms-button {
    background-color: #4a90e2;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    justify-content: center;
}

.cfs-send-sms-button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

.cfs-send-sms-button:active {
    transform: translateY(0);
}

.cfs-send-sms-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* SMS Code Input */
.cfs-sms-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cfs-sms-input {
    max-width: 120px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 8px;
    font-weight: 600;
}

/* Resend SMS Button */
.cfs-resend-sms {
    background: none;
    border: none;
    color: #4a90e2;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px;
    white-space: nowrap;
}

.cfs-resend-sms:hover {
    color: #357abd;
}

.cfs-resend-sms:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

/* Textarea */
.cfs-textarea {
    resize: vertical;
    min-height: 90px; /* Уменьшен с 120px до 90px */
}

/* Submit Button */
.cfs-submit-button {
    background-color: #8bc34a;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    justify-content: center;
}

.cfs-submit-button:hover {
    background-color: #7cb342;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 195, 74, 0.3);
}

.cfs-submit-button:active {
    transform: translateY(0);
}

.cfs-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.cfs-loader,
.cfs-sms-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.cfs-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.cfs-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Messages */
.cfs-message {
    padding: 12px 20px;
    border-radius: 4px;
    margin-top: 10px; /* Уменьшен с 15px до 10px */
    font-size: 14px;
    text-align: center;
}

.cfs-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cfs-form-group .cfs-error-message {
    color: #ff0000;
    font-size: 13px;
    margin-top: 4px; /* Уменьшен с 5px до 4px */
    display: block;
}

.cfs-message.cfs-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Debug mode notice */
.cfs-debug-notice {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 10px;
    margin-bottom: 12px; /* Уменьшен с 15px до 12px */
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.cfs-debug-notice strong {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .cfs-form-wrapper {
        padding: 12px 0; /* Уменьшен с 15px до 12px */
    }
    
    .cfs-form-group {
        margin-bottom: 12px; /* Уменьшен с 15px до 12px */
    }
    
    .cfs-input,
    .cfs-textarea,
    .cfs-phone-prefix {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .cfs-submit-button,
    .cfs-send-sms-button {
        width: 100%;
        justify-content: center;
    }
    
    .cfs-sms-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .cfs-sms-input {
        max-width: 100%;
    }
    
    .cfs-resend-sms {
        text-align: center;
        margin-top: 8px; /* Уменьшен с 10px до 8px */
    }
}