/* Основные стили для SendParcel API - iframe версия */

body {
    background-color: #faf6f0 !important;
    margin: 0;
    padding: 0;
}

.hero-section {
    background: #faf6f0;
    color: #333;
    padding: 1rem 0;
    margin: 0;
}

.feature-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.btn-primary {
    background: #242424;
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
}

.btn-primary:hover {
    background: #242424 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Убираем синий цвет при нажатии и фокусе */
.btn-primary:active,
.btn-primary:focus,
.btn-primary:focus-visible {
    background: #242424 !important;
    border-color: #242424 !important;
    box-shadow: 0 0 0 0.2rem rgba(36, 36, 36, 0.25) !important;
}

/* Убираем синий цвет при disabled состоянии */
.btn-primary:disabled,
.btn-primary.disabled {
    background: #242424 !important;
    border-color: #242424 !important;
    opacity: 0.65;
}

/* Стили для формы - iframe версия */
.calculation-form {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 1rem 1rem 1rem;
    width: calc(100% - 2rem);
    max-width: none;
}

/* Скрываем форму при скролле вниз */
.calculation-form.form-hidden {
    transform: translateY(-100%);
}

/* Контейнер для полной ширины */
.container-fluid {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
}

/* Результаты на полную ширину */
#calculationResult {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1rem;
}

#suggestionsList {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Стили для FedEx-структуры результатов */
.suggestions__item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.2s ease;
    position: relative;
}

.suggestions__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Стили для бейджей */
.suggestion__badge {
    position: absolute;
    top: -8px;
    left: -8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.badge-discount {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.badge-recommended {
    background: linear-gradient(135deg, #2ed573 0%, #1e90ff 100%);
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.4);
}

.badge-text {
    white-space: nowrap;
}

/* Стили для логотипов */
.suggestion__logo {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    position: relative;
}

.suggestion__logo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.suggestion__service-name {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.suggestion__service-name span {
    font-size: 1rem;
    font-weight: 600;
    color: #242424;
    line-height: 1.2;
}

.suggestion__offers {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.suggestion__offer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    min-width: 100px;
}

.suggestion__offer-item:hover {
    background-color: rgba(36, 36, 36, 0.05);
}

.suggestion__offer-image {
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    filter: hue-rotate(175deg);
    opacity: 0.85;
}

.suggestion__offer-image i {
    color: #242424;
    font-size: 1.5rem;
}

.suggestion__offer-text {
    text-align: center;
}

.suggestion__offer-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #343a40;
    line-height: 1.1;
}

.suggestion__offer-subtitle {
    display: block;
    font-size: 0.7rem;
    color: #343a40;
    line-height: 1.1;
    margin-top: 0.2rem;
}

/* Стили для иконок услуг */
.suggestion__icons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
    width: 140px;
    justify-content: center;
}

.suggestion__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.suggestion__icon:hover {
    background: rgba(36, 36, 36, 0.2);
    transform: scale(1.1);
}

/* Стили для иконок услуг - аналогично suggestion__offer-image */
.suggestion__icons {
    filter: hue-rotate(175deg);
    opacity: 0.85;
}

.suggestion__price-holder {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.suggestion__price {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.suggestion__no-price-discount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #242424;
    line-height: 1;
}

.suggestion__vat-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6c757d;
    margin-top: 0.2rem;
}

.suggestion__price-vat {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

/* Стили для цен со скидкой */
.suggestion__price-discount {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Стили для автодополнения */
.country-suggestions {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.country-suggestion-item {
    transition: background-color 0.2s ease;
}

.country-suggestion-item:hover {
    background-color: #f8f9fa;
}

/* Стили для сноски */
.form-footer-note {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1.5rem;
}

.form-footer-note small {
    line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .calculation-form {
        margin: 0 1rem;
    }
    
    .suggestions__item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Объединяем логотип и название в один блок */
    .suggestion__logo {
        width: auto;
        order: 2;
        margin-bottom: 0.5rem;
        flex: 1;
    }
    
    .suggestion__service-name {
        width: auto;
        order: 2;
        margin-bottom: 0.5rem;
        flex: 1;
    }
    
    /* Контейнер для логотипа и названия в одной строке */
    .suggestion__logo,
    .suggestion__service-name {
        display: inline-block;
        vertical-align: middle;
    }
    
    /* Создаем общий контейнер для логотипа и названия */
    .suggestion__logo,
    .suggestion__service-name {
        display: inline-block;
        vertical-align: middle;
        width: auto !important;
        flex: none !important;
    }
    
    /* Принудительно размещаем их рядом */
    .suggestion__logo {
        margin-right: 1rem;
    }
    
    .suggestion__service-name {
        margin-left: 0;
    }
    
    /* 3-й блок (информация о предложении) в одну строку */
    .suggestion__offers {
        order: 3;
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .suggestion__offer-item {
        min-width: auto;
        flex: 1;
        min-width: 80px;
    }
    
    .suggestion__icons {
        order: 4;
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .suggestion__price-holder {
        order: 5;
        width: 100%;
        text-align: center;
    }
}

/* Цветные рамки для разных типов предложений */
.suggestions__item.suggestion__promo {
    border: 2px solid #ff6b6b !important;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3) !important;
}

.suggestions__item.suggestion__recommended {
    border: 2px solid #2ed573 !important;
    box-shadow: 0 4px 20px rgba(46, 213, 115, 0.3) !important;
}

/* Обычные предложения */
.suggestions__item:not(.suggestion__promo):not(.suggestion__recommended) {
    border: 2px solid #e0e0e0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Hover эффекты */
.suggestions__item.suggestion__promo:hover {
    border-color: #ee5a24 !important;
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4) !important;
}

.suggestions__item.suggestion__recommended:hover {
    border-color: #1e90ff !important;
    box-shadow: 0 6px 25px rgba(46, 213, 115, 0.4) !important;
}

.suggestions__item:not(.suggestion__promo):not(.suggestion__recommended):hover {
    border-color: #b0b0b0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Стили для иконок предложений */
.offer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.collection-icon,
.delivery-icon,
.printer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Стили для заголовка результатов */
#calculationResult h4.text-primary {
    color: #242424 !important;
}

#calculationResult h4.text-primary i {
    color: #242424 !important;
}

/* Дополнительные стили для iframe */
html, body {
    height: 800px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Убираем лишние отступы */
.hero-section {
    min-height: auto;
}

/* Компактная форма для iframe */
.calculation-form .card-body {
    padding: 1rem !important;
}

/* Результаты на всю ширину */
.suggestions__list {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Адаптивность для iframe */
@media (max-width: 768px) {
    .calculation-form .card-body {
        padding: 0.75rem !important;
    }
    
    .hero-section {
        padding: 0.5rem 0;
    }
}
