/* Стили компактного блока */
.calculator-block {
    margin: 12px 0 8px 0;
    padding: 12px 12px 10px 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0);
}

.calculator-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #2c3e50;
}

.calculator-badge {
    position: absolute;
    top: -8px;
    left: 12px;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    line-height: 1;
    z-index: 10;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-badge:hover {
    transform: scale(1.05) translateY(-1px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.calculator-light-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 62, 80, 0.03), transparent);
    transition: left 0.7s ease;
    pointer-events: none;
    border-radius: 7px;
}

.calculator-content {
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

.calculator-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calculator-logo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
    padding: 3px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.calculator-logo:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

.calculator-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.calculator-logo:hover img {
    transform: scale(1.05);
}

.calculator-text {
    flex-grow: 1;
}

.calculator-title {
    color: #2c3e50;
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3px;
    transition: color 0.3s ease;
}

.calculator-block:hover .calculator-title {
    color: #3498db;
}

.calculator-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.calculator-tag {
    font-size: 0.76em;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 1px 4px;
    border-radius: 2px;
}

.calculator-block:hover .calculator-tag {
    transform: translateY(-1px);
}

.calculator-divider {
    font-size: 0.76em;
    color: #666;
    transition: color 0.3s ease;
}

.calculator-block:hover .calculator-divider {
    color: #333;
}

.calculator-arrow {
    flex-shrink: 0;
    color: #2c3e50;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.calculator-block:hover .calculator-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: #3498db;
}

/* ============ Стили модального окна ============ */
.m-podbor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.m-podbor-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-podbor-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.m-podbor-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.m-podbor-logo {
    border-radius: 6px;
}

.m-podbor-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #2c3e50;
    letter-spacing: 1px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #e74c3c;
}

.m-podbor-calculator {
    padding: 0 20px 20px;
}

.m-podbor-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.m-podbor-type {
    display: flex;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
}

.type-option {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 600;
    color: #2c3e50;
}

.type-option.active {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.m-podbor-form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

/* ИЗМЕНЕНИЕ: Кнопка желтая */
.m-podbor-button {
    width: 100%;
    background: #fff300;
    color: black;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.m-podbor-button:hover {
    background: #fffb00;
}

.m-podbor-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.result-title {
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    color: #2c3e50;
}

/* ИЗМЕНЕНИЕ: Бордер карточек желтый */
.recommendation-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #fff300;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recommendation-priority {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.recommendation-priority.ideal {
    background: #27ae60;
}

.recommendation-priority.growth {
    background: #f39c12;
}

.recommendation-priority.warning {
    background: #e74c3c;
}

.recommendation-size {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 8px 0;
    color: #2c3e50;
}

.recommendation-range {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.recommendation-note {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 8px 0;
}

/* ИЗМЕНЕНИЕ: Ссылка желтая */
.result-link {
    display: inline-block;
    background: #fff300;
    color: black;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: background 0.2s;
}

.result-link:hover {
    background: #fffb00;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.m-podbor-modal .modal-content {
    animation: modalFadeIn 0.3s ease;
}

@media (max-width: 768px) {
    .m-podbor-modal {
        padding: 10px;
    }
    .modal-content {
        max-height: 95vh;
    }
    .modal-header {
        padding: 15px;
    }
    .m-podbor-calculator {
        padding: 0 15px 15px;
    }
    .m-podbor-type {
        flex-direction: column;
        gap: 4px;
    }
    .type-option {
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .m-podbor-title {
        font-size: 1.3rem;
    }
    .m-podbor-subtitle {
        font-size: 0.8rem;
    }
}