/* Copy URL to Clipboard Button - Styled with Theme Colors */

/* ===== BASE STYLES ===== */
.copy-url-wrap {
    display: inline-block;
    position: relative;
}

.copy-url-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-color: var(--e-global-color-primary) !important;
}


/* Button Icons */
.button-icon,
.button-icon-minimal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 20px;
    height: 20px;
}

.icon-check {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.icon-copy {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.copy-url-button.copied .icon-copy {
    opacity: 0;
    transform: scale(0.5);
}

.copy-url-button.copied .icon-check {
    opacity: 1;
    transform: scale(1);
}

.button-text {
    font-size: 16px;
    font-weight: 400;
}

/* Success State */
.copy-url-button.copied {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* ===== TOAST NOTIFICATION ===== */
.copy-url-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--e-global-color-text);
    color: var(--e-global-color-279f655);
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
}

.copy-url-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-url-toast svg {
    color: #10B981;
    flex-shrink: 0;
}

/* ===== ICON STYLE VARIANT ===== */
.copy-url-style-icon .copy-url-button {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 10px;
}

.copy-url-style-icon .button-icon {
    width: 22px;
    height: 22px;
}

/* ===== MINIMAL STYLE VARIANT ===== */
.copy-url-style-minimal .copy-url-button {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--e-global-color-primary);
    color: var(--e-global-color-primary);
    box-shadow: none;
}

.copy-url-style-minimal .copy-url-button:hover {
    background: var(--e-global-color-primary);
    color: var(--e-global-color-279f655);
    border-color: var(--e-global-color-primary);
    box-shadow: 0 2px 8px rgba(33, 89, 186, 0.2);
}

.copy-url-style-minimal .copy-url-button.copied {
    background: #10B981;
    border-color: #10B981;
    color: var(--e-global-color-279f655);
}

.copy-url-style-minimal .button-text {
    font-size: 14px;
}

.copy-url-style-minimal .button-icon-minimal {
    width: 16px;
    height: 16px;
}

/* ===== FIXED POSITION VARIANT ===== */
.copy-url-position-fixed {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}


/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .copy-url-button {
        padding: 10px 20px;
        font-size: 15px;
        gap: 6px;
    }
    
    .button-icon {
        width: 18px;
        height: 18px;
    }
    
    .button-text {
        font-size: 15px;
    }
    
    .copy-url-toast {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .copy-url-position-fixed {
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .copy-url-button {
        padding: 9px 18px;
        font-size: 14px;
    }
    
    .button-text {
        font-size: 14px;
    }
    
    .copy-url-style-icon .copy-url-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .copy-url-toast {
        bottom: 12px;
        right: 12px;
        left: 12px;
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* ===== ANIMATION ===== */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.copy-url-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.copy-url-button:active::before {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

/* ===== ACCESSIBILITY ===== */
.copy-url-button:focus-visible {
    outline: 3px solid var(--e-global-color-secondary);
    outline-offset: 3px;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .copy-url-button {
    flex-direction: row-reverse;
}

[dir="rtl"] .copy-url-toast {
    left: 24px;
    right: auto;
}

[dir="rtl"] .copy-url-position-fixed {
    left: 24px;
    right: auto;
}

@media (max-width: 768px) {
    [dir="rtl"] .copy-url-toast {
        left: 16px;
        right: auto;
    }
    
    [dir="rtl"] .copy-url-position-fixed {
        left: 16px;
        right: auto;
    }
}