@import 'variables.css';

.product-how-to-take {
    padding: var(--spacing-xl);
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-how-to-take__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.product-how-to-take__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.product-how-to-take__item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.product-how-to-take__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-top: 2px;
}

.product-how-to-take__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-how-to-take__text {
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    flex: 1;
}

.product-how-to-take__full-instruction {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #e5e7eb;
}

.product-how-to-take__button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    padding: var(--spacing-sm) 0;
    transition: color 0.3s ease;
}

.product-how-to-take__button:hover {
    color: #1d4d36;
}

.product-how-to-take__button-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal__content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid #e5e7eb;
}

.modal__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal__close:hover {
    background-color: #f3f4f6;
    color: var(--text-color);
}

.modal__body {
    padding: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
}

.modal__body h1,
.modal__body h2,
.modal__body h3,
.modal__body h4,
.modal__body h5,
.modal__body h6 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

.modal__body p {
    margin-bottom: var(--spacing-md);
}

.modal__body ul,
.modal__body ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.modal__body li {
    margin-bottom: var(--spacing-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .product-how-to-take {
        padding: var(--spacing-lg);
    }

    .product-how-to-take__title {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-lg);
    }

    .product-how-to-take__text {
        font-size: var(--font-size-sm);
    }

    .product-how-to-take__item {
        gap: var(--spacing-md);
    }

    .product-how-to-take__icon {
        width: 30px;
        height: 30px;
    }

    .modal__content {
        width: 95%;
        max-height: 90vh;
    }

    .modal__header,
    .modal__body {
        padding: var(--spacing-md);
    }
}
