/* Стили для функционала визуальной примерки дизайна */

.try-on-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.try-on-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.try-on-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
}

/* Контейнер для canvas */
.canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#try-on-canvas {
    width: 800px;
    height: 670px;
    max-width: 100vw;
    max-height: 100vh;
    display: block;
    margin: 0 auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: move;
}

/* Панель выбора изделий */
.product-selector-panel {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product-selector {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.product-selector:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.product-selector.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* Панель управления */
.controls-panel {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.control-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.control-btn i {
    font-size: 16px;
}

/* Кнопки управления */
.scale-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.scale-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

/* Группы элементов управления */
.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-label {
    font-weight: bold;
    color: #666;
    min-width: 50px;
    text-align: center;
}

/* Информационная панель */
.info-panel {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.info-panel h4 {
    color: #1976d2;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.info-panel p {
    color: #424242;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Кнопка сохранения результата */
.save-result-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
}

.save-result-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.save-result-btn:active {
    transform: translateY(0);
}

/* Модальное окно для результата */
.result-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.result-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.result-modal img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
}

.close-modal:hover {
    color: #000;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .try-on-container {
        padding: 15px;
    }
    
    .product-selector-panel {
        gap: 8px;
    }
    
    .product-selector {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .controls-panel {
        gap: 8px;
    }
    
    .control-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .scale-btn {
        width: 35px;
        height: 35px;
    }
    
    #try-on-canvas {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 900px) {
    .canvas-container {
        padding: 10px;
    }
    #try-on-canvas {
        max-width: 100vw;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.try-on-container {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для загрузки */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
}

.loading i {
    font-size: 24px;
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Стили для подсказок */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
} 