/**
 * Стили для шага добавления фото и fallback-попапа
 * Цветовая палитра: фон #0f0f0f, акцент #FFAA10
 */

/* ====== БАЗОВЫЕ СТИЛИ ====== */
.photo-upload-step {
    width: 100%;
    max-width: 600px; /* Limit width for better look */
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
    box-sizing: border-box;
    background: transparent; /* Ensure no weird background */
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ====== ИКОНКА ====== */
.photo-step-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* ====== ЗАГОЛОВОК ====== */
.photo-step-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    font-family: 'Montserrat', sans-serif;
}

.photo-step-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
    font-family: 'Roboto', sans-serif;
}

/* ====== ЗОНА ЗАГРУЗКИ ====== */
.photo-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    border-color: #FFAA10;
    background: rgba(255, 170, 16, 0.1);
}

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.photo-upload-icon { font-size: 36px; color: rgba(255, 255, 255, 0.5); }
.photo-upload-text { font-size: 14px; color: rgba(255, 255, 255, 0.6); }

/* ====== ПРЕВЬЮ ФОТО ====== */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }

.photo-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(255, 0, 0, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-remove-btn:hover { background: #ff0000; transform: scale(1.1); }

/* ====== КНОПКИ ====== */
.photo-step-buttons { display: flex; flex-direction: column; gap: 10px; }

.photo-send-btn {
    width: 100%;
    padding: 14px 20px;
    background: #FFAA10;
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.photo-send-btn:hover { background: #FFB833; }

.photo-skip-btn {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.photo-skip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ====== DESCRIPTION STEP ====== */
.description-textarea-wrapper {
    margin: 25px 0;
    position: relative;
}

.description-textarea {
    width: 100%;
    padding: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease, border-style 0.3s ease;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.description-textarea:focus {
    outline: none;
    border-color: #FFAA10;
    border-style: solid;
    background: rgba(255, 255, 255, 0.08);
}

.description-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.description-counter {
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-family: 'Roboto', sans-serif;
}

/* ====== МОБИЛЬНЫЕ ====== */
@media screen and (max-width: 767px) {
    .photo-upload-step { padding: 15px; }
    .photo-step-icon { font-size: 36px; }
    .photo-step-title { font-size: 16px; }
    .photo-step-desc { font-size: 12px; }
    .photo-upload-area { padding: 20px 15px; }
    .photo-preview-grid { grid-template-columns: repeat(3, 1fr); }
    .photo-add-btn,
    .photo-skip-btn,
    .photo-send-btn { padding: 12px 16px; font-size: 13px; }
}

/* ====== ФИКС ДУБЛЯЖА ИНДИКАТОРОВ ====== */
.elementor-form .e-form__indicators:not(:first-of-type) {
    display: none !important;
}

/* ====== POPUP FALLBACK ====== */
.vikup-popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.vikup-popup.dialog-lightbox-show { display: flex; }

.vikup-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.vikup-popup__box {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 0;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: none;
    color: #fff;
    z-index: 1;
    display: block;
}

.vikup-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vikup-popup__close:hover { background: rgba(255, 255, 255, 0.2); }

/* Внутри попапа показываем оригинальные стили Elementor-формы (как на первом экране).
   Не переопределяем лейблы/инпуты/кнопки, иначе форма «едет». */
