/**
 * Copy Page Link - Frontend Styles
 * Design 100% matches the provided image:
 * - Dark blue background (#1a3a6e)
 * - White text "Copy Page Link"
 * - Link/chain icon on the left
 * - Rounded corners (8px)
 */

/* ============================================
   Wrapper
   ============================================ */
.cpl-wrap {
    margin: 16px 0;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

/* === Positions === */
.cpl-wrap.cpl-pos-top-left { justify-content: flex-start; }
.cpl-wrap.cpl-pos-top-right { justify-content: flex-end; }
.cpl-wrap.cpl-pos-center { justify-content: center; }
.cpl-wrap.cpl-pos-bottom-left { justify-content: flex-start; }
.cpl-wrap.cpl-pos-bottom-right { justify-content: flex-end; }

/* ============================================
   Button - EXACT design match
   ============================================ */
.cpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    /* Exact dark blue from image */
    background-color: var(--cpl-color, #1a3a6e);
    color: #ffffff;

    /* Rounded corners */
    border-radius: 8px;

    /* Padding */
    padding: 12px 24px;

    /* No border */
    border: none;
    outline: none;
    cursor: pointer;

    /* Font */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;

    /* Shadow */
    box-shadow: 0 2px 8px rgba(26, 58, 110, 0.3);

    /* Transitions */
    transition: all 0.3s ease;

    /* No selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;

    white-space: nowrap;
    line-height: 1.4;
}

/* === Hover === */
.cpl-btn:hover {
    background-color: #214a85;
    box-shadow: 0 4px 14px rgba(26, 58, 110, 0.45);
    transform: translateY(-1px);
}

/* === Active === */
.cpl-btn:active {
    background-color: #15305a;
    box-shadow: 0 1px 4px rgba(26, 58, 110, 0.25);
    transform: translateY(0);
}

/* === Icon === */
.cpl-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
}

.cpl-icon svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* === Text === */
.cpl-text {
    display: inline-block;
}

/* === Copied State === */
.cpl-btn.cpl-copied {
    background-color: #27ae60 !important;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.35);
}

.cpl-btn.cpl-copied:hover {
    background-color: #2ecc71 !important;
}

/* === Focus === */
.cpl-btn:focus-visible {
    outline: 3px solid #5b9bd5;
    outline-offset: 2px;
}

/* ============================================
   Toast Notification
   ============================================ */
.cpl-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #27ae60;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4);
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cpl-toast.cpl-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cpl-toast.cpl-toast-error {
    background-color: #e74c3c;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .cpl-btn {
        padding: 10px 18px;
        font-size: 14px;
        gap: 8px;
    }
    .cpl-icon svg {
        width: 16px;
        height: 16px;
    }
}
