/* Основной контейнер */
.fcf-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    position: relative;
}

/* Заголовки */
.fcf-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.fcf-title {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.2;
}

.fcf-subtitle {
    font-size: clamp(16px, 3vw, 18px);
    color: #666;
    margin: 0;
}

/* Новый дизайн шапки шага */
.fcf-step-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.fcf-step-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    position: relative;
}

.fcf-step-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.fcf-step-label {
    font-size: 11px;
    opacity: 0.9;
}

.fcf-step-info {
    flex: 1;
}

.fcf-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.fcf-step-desc {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Шаги формы */
.fcf-step {
    display: none;
    animation: slideIn 0.4s ease;
}

.fcf-step.fcf-active {
    display: block;
}

/* Область загрузки - новый дизайн */
.fcf-upload-area {
    margin-bottom: 30px;
}

.fcf-upload-button {
    display: block;
    padding: 40px 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 20px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.fcf-upload-button:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.fcf-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    padding: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.fcf-upload-icon svg {
    width: 100%;
    height: 100%;
    color: #667eea;
}

.fcf-upload-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fcf-upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.fcf-upload-hint {
    font-size: 14px;
    color: #666;
}

.fcf-upload-formats {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Превью изображений */
.fcf-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.fcf-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fcf-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fcf-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e53e3e;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fcf-preview-remove:hover {
    transform: scale(1.1);
    background: #fff;
}

/* Варианты связи - улучшенный дизайн */
.fcf-contact-options {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.fcf-contact-option input {
    display: none;
}

.fcf-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fcf-option-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fcf-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fcf-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.fcf-option-desc {
    font-size: 13px;
    color: #999;
}

.fcf-contact-option input:checked + .fcf-option-card {
    border-color: #667eea;
    background: #f8f9ff;
    transform: scale(1.02);
}

/* Секция телефона с виртуальной клавиатурой */
.fcf-phone-section {
    margin-bottom: 30px;
}

.fcf-phone-display {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

.fcf-phone-prefix {
    color: #999;
}

.fcf-phone-value {
    color: #333;
    letter-spacing: 1px;
}

.fcf-phone-cursor {
    animation: blink 1s infinite;
    color: #667eea;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Виртуальная клавиатура */
.fcf-virtual-keyboard {
    background: #689fdd;
    border-radius: 20px;
    padding: 16px;
    display: none;
}

@media (max-width: 768px) {
    .fcf-virtual-keyboard {
        display: block;
    }
    
    .fcf-phone-input-desktop {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .fcf-virtual-keyboard {
        display: none !important;
    }
    
    .fcf-phone-input-desktop {
        display: block !important;
        width: 100%;
        padding: 18px 24px;
        font-size: 18px;
        border: 2px solid #e0e0e0;
        border-radius: 16px;
        transition: all 0.3s ease;
        background: white;
        text-align: center;
        letter-spacing: 1px;
    }
    
    .fcf-phone-display {
        display: none;
    }
}

.fcf-keyboard-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

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

.fcf-key {
    position: relative;
    padding: 0;
    height: 60px;
    background: white;
    border: none;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fcf-key span {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    letter-spacing: 1px;
}

.fcf-key:hover {
    background: #f0f0f0;
}

.fcf-key:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fcf-key-special {
    background: #ff3737;
}

.fcf-key-special svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
	
}

/* Кнопки */
.fcf-next-button,
.fcf-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fcf-next-button:hover:not(.fcf-disabled),
.fcf-submit-button:hover:not(.fcf-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.fcf-next-button.fcf-disabled,
.fcf-submit-button.fcf-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Сообщение об успехе */
.fcf-success-message {
    display: none;
    text-align: center;
    padding: 40px;
}

.fcf-success-message.fcf-show {
    display: block;
}

.fcf-success-animation {
    margin-bottom: 24px;
}

.fcf-success-icon {
    width: 80px;
    height: 80px;
}

.fcf-success-circle {
    stroke: #4CAF50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: circle 0.6s ease-in-out forwards;
}

.fcf-success-check {
    stroke: #4CAF50;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: check 0.3s 0.6s ease-in-out forwards;
}

@keyframes circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes check {
    to {
        stroke-dashoffset: 0;
    }
}

.fcf-success-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 12px;
}

/* Анимации */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Уведомления */
.fcf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 90vw;
}

.fcf-notification-show {
    transform: translateX(0);
}

.fcf-notification-error {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .fcf-container {
        padding: 16px;
    }
    
    .fcf-step-header {
        gap: 16px;
    }
    
    .fcf-step-badge {
        min-width: 50px;
        height: 50px;
    }
    
    .fcf-step-number {
        font-size: 20px;
    }
    
    .fcf-step-title {
        font-size: 18px;
    }
    
    .fcf-upload-button {
        padding: 30px 16px;
    }
    
    .fcf-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .fcf-notification {
        right: 10px;
        left: 10px;
        max-width: calc(100vw - 20px);
    }
}
