/**
 * Mech Cookie Consent — стили баннера и модального окна
 * Полностью в стиле сайта md1.by
 */

/* ===== БАННЕР (по центру снизу, как на скриншоте) ===== */
.mech-cc-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 934px;
    min-width: 320px;
    z-index: 999998;
    font-family: "Inter", sans-serif;
    background: #ffffff;
    border: 1px solid rgba(204, 213, 215, 1);
    box-shadow: 0px 4px 32.3px 0px rgba(0, 0, 0, 0.25);

    border-radius: 30px;
    padding: 24px;
    animation: mech-cc-slide-up 0.3s ease-out;
}

@keyframes mech-cc-slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.mech-cc-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mech-cc-banner-title {
	font-weight: 700;
	font-style: Bold;
	font-size: 24px;
	line-height: 130%;
	margin-bottom: 10px;
	text-align: center;
}

.mech-cc-banner-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(51, 47, 47, 0.95);
    text-align: center;
}

.mech-cc-banner-text a {
    color: rgba(74, 113, 151, 1);
    text-decoration: underline;
    transition: 0.5s;
}

.mech-cc-banner-text a:hover {
    color: rgb(86, 160, 208);
}

.mech-cc-banner-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* ===== КНОПКИ БАННЕРА ===== */
/* .mech-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.5s;
    border: 1px solid transparent;
    white-space: nowrap;
} */

/* .mech-cc-btn-accept {
    background: rgba(74, 113, 151, 1);
    color: #fff;
    border-color: rgba(74, 113, 151, 1);
    box-shadow: 0px 3px 2.4px 0px rgba(60, 107, 148, 0.15);
}

.mech-cc-btn-accept:hover {
    background: rgb(86, 160, 208);
    border-color: rgb(86, 160, 208);
    color: #fff;
}

.mech-cc-btn-reject {
    background: #fff;
    color: rgba(51, 47, 47, 0.9);
    border: 1px solid rgba(74, 113, 151, 1);
}

.mech-cc-btn-reject:hover {
    background: rgba(74, 113, 151, 1);
    color: white;
}

.mech-cc-btn-settings {
    background: #fff;
    color: rgba(51, 47, 47, 0.9);
    border: 1px solid rgba(204, 213, 215, 1);
}

.mech-cc-btn-settings:hover {
    background: rgba(239, 242, 246, 1);
    border-color: rgba(74, 113, 151, 0.5);
} */

.mech-cc-btn{
	background:transparent
}
.button-3{
	    background: rgba(74, 113, 151, 1);
    color: white;
}
.button-3:hover{
	    border: 1px solid rgba(74, 113, 151, 1);
		color: rgba(74, 113, 151, 1);
		background:transparent;
}

/* ===== МОДАЛЬНОЕ ОКНО (как на скриншоте 2) ===== */
.mech-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

.mech-cc-modal[hidden] {
    display: none !important;
}

.mech-cc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
}

.mech-cc-modal-box {
    position: relative;
    width: 100%;
    max-width: 934px;
    max-height: 85vh;
    background: #ffffff;
    border: 1px solid rgba(204, 213, 215, 1);
    box-shadow: 0px 3px 6.8px 0px rgba(127, 155, 162, 0.25) inset,
                0px 20px 40px rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
	padding:40px;
}

/* .mech-cc-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: rgba(239, 242, 246, 1);
    border: 0.8px solid rgba(204, 213, 215, 1);
    box-shadow: 0px 3px 6.8px 0px rgba(127, 155, 162, 0.25) inset;
    color: rgba(51, 47, 47, 0.9);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mech-cc-modal-close:hover {
    background: rgba(74, 113, 151, 1);
    color: white;
} */

/* Заголовки как на скриншоте */
.mech-cc-modal-title {
    margin: 0;
    padding: 32px 56px 16px 32px;
    font-size: 32px;
    font-weight: 300;
    color: rgba(51, 47, 47, 1);
    line-height: 100%;
    letter-spacing: -1.5px;
}

.mech-cc-modal-subtitle {
    margin: 0 0 24px;
    padding: 0 32px;
    font-size: 20px;
    font-weight: 400;
    color: rgba(51, 47, 47, 0.8);
}

/* Тело модалки со скроллом */
.mech-cc-modal-body {
    /* padding: 0 32px 20px; */
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    /*background: #f9fbfd;*/
	display: flex;
	flex-direction: column;
	gap:40px;
}

.mech-cc-modal-body::-webkit-scrollbar {
    width: 6px;
}

.mech-cc-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.mech-cc-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* ===== КАТЕГОРИИ COOKIE ===== */
.mech-cc-category {
    background: rgb(255, 255, 255);
    border: 0.8px solid rgba(204, 213, 215, 1);
    box-shadow: 0px 3px 6.8px 0px rgba(127, 155, 162, 0.25) inset;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    transition: 0.5s;
}

.mech-cc-category:hover {
    box-shadow: 0px 4px 12px 0px rgba(74, 113, 151, 0.2) inset;
}

.mech-cc-category:last-child {
    margin-bottom: 0;
}

.mech-cc-category-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    color: rgba(51, 47, 47, 1);
    line-height: 130%;
}

.mech-cc-category-desc {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 150%;
    color: rgba(51, 47, 47, 0.85);
}

/* Переключатель (toggle) в стиле сайта */
.mech-cc-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(204, 213, 215, 0.5);
}

.mech-cc-toggle-wrap.mech-cc-toggle-disabled {
    opacity: 0.8;
}

.mech-cc-toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: rgba(51, 47, 47, 1);
    cursor: pointer;
}

.mech-cc-toggle {
    position: relative;
    width: 52px;
    height: 26px;
    flex-shrink: 0;
    background: rgba(204, 213, 215, 0.8);
    border-radius: 13px;
    transition: background 0.3s;
    border: 1px solid rgba(74, 113, 151, 0.2);
}

.mech-cc-toggle-btn {
    padding: 0;
    border: none;
    cursor: pointer;
    background: #adadad4d;
}

/* Активное состояние - синий */
.mech-cc-toggle-btn[aria-checked="true"] .mech-cc-toggle,
.mech-cc-toggle.mech-cc-toggle-on {
    background: rgba(74, 113, 151, 1);
}

.mech-cc-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сдвиг при включении */
.mech-cc-toggle-btn[aria-checked="true"] .mech-cc-toggle-slider,
.mech-cc-toggle.mech-cc-toggle-on .mech-cc-toggle-slider {
    transform: translateX(26px);
}

/* Disabled состояние для технических */
.mech-cc-toggle-disabled .mech-cc-toggle {
    background: #e0e7ff;
    cursor: not-allowed;
}

.mech-cc-toggle-disabled .mech-cc-toggle-slider {
    background: #a0b8d0;
}

/* ===== ССЫЛКИ НА БРАУЗЕРЫ ===== */
.mech-cc-browser-links {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(204, 213, 215, 1);
    border-radius: 14px;
}

.mech-cc-browser-links-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(51, 47, 47, 1);
}

.mech-cc-browser-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.mech-cc-browser-links a {
    font-size: 14px;
    color: rgba(74, 113, 151, 1);
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 1px solid transparent;
}

.mech-cc-browser-links a:hover {
    color: rgb(86, 160, 208);
    border-bottom-color: currentColor;
}

/* ===== ФУТЕР МОДАЛКИ ===== */
.mech-cc-modal-footer {
    display: flex;
    gap: 16px;
    padding-top:30px;
    border-top: 1px solid rgba(204, 213, 215, 0.5);
    background: #ffffff;
}

/* .mech-cc-save-settings {
    background: rgba(74, 113, 151, 1);
    color: #fff;
    border-color: rgba(74, 113, 151, 1);
    flex: 2;
}

.mech-cc-save-settings:hover {
    background: rgb(86, 160, 208);
} */

/* .mech-cc-close-modal {
    background: #fff;
    color: rgba(51, 47, 47, 0.9);
    border: 1px solid rgba(204, 213, 215, 1);
    flex: 1;
} */

/* ===== ССЫЛКА В ФУТЕРЕ САЙТА ===== */
.mech-cc-footer-link {
    text-align: center;
    margin: 20px 0;
}

.mech-cc-footer-link a {
    color: rgba(74, 113, 151, 1);
    text-decoration: underline;
    font-size: 16px;
    transition: 0.3s;
}

.mech-cc-footer-link a:hover {
    color: rgb(86, 160, 208);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .mech-cc-banner {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: none;
        padding: 20px;
		padding-left:12px;
		padding-right:12px;
    }
    
    @keyframes mech-cc-slide-up {
        from {
            opacity: 0;
            transform: translate(-50%, 20px);
        }
        to {
            opacity: 1;
            transform: translate(-50%, 0);
        }
    }
    
    .mech-cc-banner-buttons {
        flex-direction: column;
		grid-template-columns: repeat(1, 1fr);
    }
	.mech-cc-banner-title{
		margin-bottom:0;
		
	}
    
    /* .mech-cc-btn {
        width: 100%;
        padding: 15px;
        font-size: 14px;
    } */
    
    .mech-cc-modal-box {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .mech-cc-modal-title {
        font-size: 28px;
        /*padding: 24px 40px 12px 24px;*/
    }
    
    .mech-cc-modal-subtitle {
        padding: 0 24px;
        font-size: 18px;
    }
    
    .mech-cc-modal-body {
        /*padding: 0 24px 16px;*/
    }
    
    .mech-cc-category {
        padding: 16px;
    }
    
    .mech-cc-category-title {
        font-size: 20px;
    }
    
    .mech-cc-modal-footer {
        /*padding: 16px 24px 24px;*/
        flex-direction: column;
    }
    
    /* .mech-cc-modal-close {
        top: 16px;
        right: 20px;
        width: 40px;
        height: 40px;
    } */
    .mech-cc-modal-box{
        padding:10px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .mech-cc-modal-title {
        font-size: 24px;
        padding-right: 44px;
    }
    
    .mech-cc-browser-links ul {
        gap: 8px 16px;
    }
}
