/* Main styles for SendParcel API - iframe version */

/* Reset button styles to remove Bootstrap defaults */
.btn, button, input[type="submit"], input[type="button"] {
    background: #242424;
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.btn:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    background: #242424 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn:active, button:active, input[type="submit"]:active, input[type="button"]:active,
.btn:focus, button:focus, input[type="submit"]:focus, input[type="button"]:focus {
    background: #242424 !important;
    border-color: #242424 !important;
    box-shadow: 0 0 0 0.2rem rgba(36, 36, 36, 0.25) !important;
    outline: none;
}

/* Reset form field styles to remove Bootstrap defaults */
input[type="text"], input[type="email"], input[type="number"], input[type="tel"], 
input[type="password"], textarea, select {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, 
input[type="tel"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: #242424;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(36, 36, 36, 0.1);
}

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;
}

/* Hide form when scrolling down */
.calculation-form.form-hidden {
    transform: translateY(-100%);
}

/* Container for full width */
.container-fluid {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
}

/* Results for full width */
#calculationResult {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1rem;
}

#suggestionsList {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Styles for FedEx result structure */
.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);
}

/* Styles for badges */
.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;
}

/* Styles for logos */
.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;
}

/* Styles for service icons */
.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);
}

/* Styles for service icons - similar to 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;
}

/* Styles for discounted prices */
.suggestion__price-discount {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Styles for autocomplete */
.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;
}

/* Styles for footer note */
.form-footer-note {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1.5rem;
}

.form-footer-note small {
    line-height: 1.4;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .calculation-form {
        margin: 0 1rem;
    }
    
    .suggestions__item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
            /* Combine logo and name in one block */
    .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;
    }
    
            /* Container for logo and name in one line */
    .suggestion__logo,
    .suggestion__service-name {
        display: inline-block;
        vertical-align: middle;
    }
    
            /* Create common container for logo and name */
    .suggestion__logo,
    .suggestion__service-name {
        display: inline-block;
        vertical-align: middle;
        width: auto !important;
        flex: none !important;
    }
    
            /* Force them to be side by side */
    .suggestion__logo {
        margin-right: 1rem;
    }
    
    .suggestion__service-name {
        margin-left: 0;
    }
    
            /* 3rd block (offer information) in one line */
    .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;
    }
}

/* Colored borders for different offer types */
.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;
}

/* Regular offers */
.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 effects */
.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;
}

/* Styles for offer icons */
.offer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.collection-icon,
.delivery-icon,
.printer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Styles for result headers */
#calculationResult h4.text-primary {
    color: #242424 !important;
}

#calculationResult h4.text-primary i {
    color: #242424 !important;
}

/* Additional styles for iframe */
html, body {
    height: auto;
    min-height: auto;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Remove extra margins */
.hero-section {
    min-height: auto;
}

/* Compact form for iframe */
.calculation-form .card-body {
    padding: 1rem !important;
}

/* Results for full width */
.suggestions__list {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Responsiveness for iframe */
@media (max-width: 768px) {
    .calculation-form .card-body {
        padding: 0.75rem !important;
    }
    
    .hero-section {
        padding: 0.5rem 0;
    }
}
