/* ========================================
   КОМПОНЕНТ: ctr-btn
   Описание: CTA кнопка (Call To Action) с эффектами
   ======================================== */

/* Базовая CTA кнопка */
.ctr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2px;
    

    font-weight: 600;
    font-size: 18px;
    text-align: center;
    color: #FFFFFF;
    
    border: none;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    position: relative;
    
    /* Внешний контейнер (Lvl1) */
    background: linear-gradient(180deg, rgba(119, 175, 248, 1) 0%, rgba(158, 203, 250, 1) 100%);
    box-shadow: 
        0px 4px 32px 0px rgba(158, 203, 250, 0.24),
        inset 0px -4px 12px 0px rgba(236, 245, 254, 1);
    
    /* Размер по умолчанию (бывший --l) */
    height: 52px;
    min-width: 148px;
}

/* Внутренний контейнер с градиентом */
.ctr-btn::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23, 114, 242, 1) 0%, rgba(81, 149, 246, 1) 100%);
    z-index: 0;
    padding: 0 12px;
}

/* Градиентная рамка через дополнительный псевдоэлемент */
.ctr-btn::after {
    /*content: '';*/
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(119, 175, 248, 1) 0%, rgba(81, 149, 246, 1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Контент кнопки */
.ctr-btn__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
}

/* Иконка */
.ctr-btn__icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.ctr-btn__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========================================
   STATES - Состояния
   ======================================== */

/* Hover */
.ctr-btn:hover::before {
    background: linear-gradient(180deg, rgba(11, 87, 193, 1) 0%, rgba(23, 114, 242, 1) 100%);
}

.ctr-btn:hover::after {
    background: linear-gradient(180deg, rgba(177, 213, 251, 1) 0%, rgba(158, 203, 250, 1) 100%);
}

/* Active */
.ctr-btn:active {
    background: linear-gradient(180deg, rgba(119, 175, 248, 1) 0%, rgba(158, 203, 250, 1) 100%);
}

.ctr-btn:active::before {
    background: linear-gradient(180deg, rgba(7, 61, 135, 1) 0%, rgba(11, 87, 193, 1) 100%);
}

.ctr-btn:active::after {
    background: linear-gradient(180deg, rgba(177, 213, 251, 1) 0%, rgba(158, 203, 250, 1) 100%);
    opacity: 0.5;
}

/* Focus */
.ctr-btn:focus-visible {
    outline: 2px solid rgba(119, 175, 248, 0.6);
    outline-offset: 2px;
}

.ctr-btn:focus-visible::before {
    background: linear-gradient(180deg, rgba(11, 87, 193, 1) 0%, rgba(23, 114, 242, 1) 100%);
}

.ctr-btn:focus-visible::after {
    background: linear-gradient(180deg, rgba(177, 213, 251, 1) 0%, rgba(158, 203, 250, 1) 100%);
}

/* Disabled */
.ctr-btn:disabled,
.ctr-btn.is-disabled {
    background: linear-gradient(180deg, rgba(9, 69, 155, 1) 0%, rgba(11, 87, 193, 1) 100%);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.4);
}

.ctr-btn:disabled::before,
.ctr-btn.is-disabled::before {
    background: linear-gradient(180deg, rgba(4, 35, 77, 1) 0%, rgba(11, 87, 193, 1) 100%);
}

.ctr-btn:disabled::after,
.ctr-btn.is-disabled::after {
    background: linear-gradient(180deg, rgba(11, 87, 193, 1) 0%, rgba(12, 95, 213, 1) 100%);
    opacity: 0.2;
}

/* ========================================
   SIZE VARIANTS - Размеры
   ======================================== */

/* Size XL (для угловых случаев) */
.ctr-btn--xl {
    height: 56px;
    font-size: 18px;
}

/* ========================================
   MEDIA QUERIES - Адаптивность (Desktop-first)
   ======================================== */

/* ≤1599 */
@media (max-width: 1599px) {
}

/* ≤1439 */
@media (max-width: 1439px) {
}

/* ≤1279 */
@media (max-width: 1279px) {
}

/* ≤959 */
@media (max-width: 959px) {
    .ctr-btn {
        font-size: 16px;
        height: 44px;
    }
    
    .ctr-btn--xl {
        height: 48px;
        font-size: 16px;
    }
}

/* ≤599 */
@media (max-width: 599px) {
    .ctr-btn {
        font-size: 14px;
        height: 40px;
        min-width: 120px;
    }
    
    .ctr-btn--xl {
        height: 44px;
        font-size: 14px;
    }
}

/*
HTML разметка:

Базовое использование (размер по умолчанию):
<button class="ctr-btn">
  <span class="ctr-btn__content">Button</span>
</button>

С иконками:
<button class="ctr-btn">
  <span class="ctr-btn__content">
    <span class="ctr-btn__icon">
      <svg>...</svg>
    </span>
    <span>Button</span>
    <span class="ctr-btn__icon">
      <svg>...</svg>
    </span>
  </span>
</button>

Размер XL (для угловых случаев):
<button class="ctr-btn ctr-btn--xl">
  <span class="ctr-btn__content">Button</span>
</button>

Disabled:
<button class="ctr-btn" disabled>
  <span class="ctr-btn__content">Button</span>
</button>
*/

