/* style.css - Эффектная кнопка копирования */

/* Контейнер кнопки */
.copy-quote-button-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    margin-bottom: 25px;
    width: 100%;
}

/* Основная кнопка */
.copy-quote-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, #007cba 0%, #005a8c 50%, #003d66 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 4px 15px rgba(0, 124, 186, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    line-height: 1.2;
    letter-spacing: 0.5px;
    overflow: hidden;
    min-height: 50px;
    min-width: 140px;
    transform-origin: center;
}

/* Бликовый эффект */
.copy-quote-button .btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
    transition: all 0.6s ease;
}

.copy-quote-button:hover .btn-shine {
    transform: translate(10%, 10%);
    background: radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

/* Содержимое кнопки */
.copy-quote-button .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.copy-quote-button .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.copy-quote-button .btn-text {
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Иконки */
.copy-quote-button .copy-icon,
.copy-quote-button .check-icon {
    flex-shrink: 0;
    stroke: currentColor;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.copy-quote-button .hidden {
    display: none !important;
}

/* Эффекты при наведении */
.copy-quote-button:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #0088d4 0%, #006699 50%, #004a7a 100%);
    box-shadow: 
        0 8px 30px rgba(0, 124, 186, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.copy-quote-button:hover .copy-icon {
    transform: rotate(-5deg) scale(1.1);
}

/* Эффект нажатия */
.copy-quote-button.pressed {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* Состояние "Скопировано" */
.copy-quote-button.copied {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 50%, #146c28 100%);
    box-shadow: 
        0 4px 20px rgba(40, 167, 69, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: successPulse 0.6s ease;
}

.copy-quote-button.copied:hover {
    background: linear-gradient(135deg, #34ce57 0%, #28a745 50%, #1e7e34 100%);
    box-shadow: 
        0 8px 35px rgba(40, 167, 69, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.copy-quote-button.copied .check-icon {
    animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимации */
@keyframes checkPop {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.05);
    }
    60% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(80px) rotate(720deg) scale(0);
    }
}

/* Поддержка светлой/темной темы */
@media (prefers-color-scheme: dark) {
    .copy-quote-button {
        background: linear-gradient(135deg, #0a7fc9 0%, #0866a3 50%, #064a7a 100%);
        box-shadow: 
            0 4px 20px rgba(10, 127, 201, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    .copy-quote-button:hover {
        background: linear-gradient(135deg, #1a8fd9 0%, #0a7fc9 50%, #0866a3 100%);
        box-shadow: 
            0 8px 35px rgba(10, 127, 201, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .copy-quote-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
        min-height: 44px;
        min-width: unset;
        border-radius: 40px;
    }
    
    .copy-quote-button .btn-content {
        gap: 8px;
    }
    
    .copy-quote-button-container {
        margin-top: 15px;
        margin-bottom: 20px;
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .copy-quote-button {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 40px;
        border-radius: 35px;
    }
    
    .copy-quote-button .copy-icon,
    .copy-quote-button .check-icon {
        width: 16px;
        height: 16px;
    }
}

/* Для людей с vestibular disorders */
@media (prefers-reduced-motion: reduce) {
    .copy-quote-button,
    .copy-quote-button * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .copy-quote-button .btn-shine {
        display: none;
    }
}

/* Фокус для доступности */
.copy-quote-button:focus-visible {
    outline: 3px solid #007cba;
    outline-offset: 3px;
}

/* Дополнительный эффект - градиентная граница */
.copy-quote-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #007cba, #00d4ff, #007cba);
    border-radius: 52px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.copy-quote-button:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        background: linear-gradient(135deg, #007cba, #00d4ff, #007cba);
    }
    50% {
        background: linear-gradient(225deg, #007cba, #00d4ff, #007cba);
    }
    100% {
        background: linear-gradient(135deg, #007cba, #00d4ff, #007cba);
    }
}
