/* =========================================
   Copy Page Button — copy-page-button.css
   ========================================= */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ── Wrapper ── */
.cpb-wrap {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0 1.5rem;
}

/* ── Base button ── */
.cpb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;

    /* Square shape */
    width: 53px;
    height: 53px;
    flex-direction: column;

    background: #d6edf8;
    color: #1a6e9a;
    border: 2px solid #a8d4ec;
    border-radius: 8px;

    font-family: 'DM Sans', sans-serif;
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;

    overflow: hidden;
    outline: none;

    /* Smooth transitions */
    transition:
        transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.22s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;

    /* Subtle drop shadow */
    box-shadow:
        0 2px 8px rgba(90, 175, 212, 0.18),
        0 1px 2px rgba(0,0,0,0.06);
}

/* ── Hover — magnify + deepen ── */
.cpb-btn:hover {
    transform: scale(1.10);
    background: #b8e0f4;
    border-color: #5aafd4;
    color: #0d5278;
    box-shadow:
        0 8px 28px rgba(90, 175, 212, 0.38),
        0 2px 6px rgba(0,0,0,0.10);
}

/* ── Focus ring (accessibility) ── */
.cpb-btn:focus-visible {
    outline: 3px solid #5aafd4;
    outline-offset: 4px;
}

/* ── Active press ── */
.cpb-btn:active {
    transform: scale(1.04);
    box-shadow:
        0 3px 10px rgba(90, 175, 212, 0.25),
        0 1px 3px rgba(0,0,0,0.08);
}

/* ── Icon ── */
.cpb-icon svg,
.cpb-check svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ── Label ── */
.cpb-label {
    line-height: 1;
    font-size: 9px;
}

/* ── Checkmark (hidden by default) ── */
.cpb-check {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: #a8dff2;
    color: #0a6b40;
    opacity: 0;
    transform: scale(0.7);
    transition:
        opacity 0.25s ease,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 8px;
}

/* ── Copied state ── */
.cpb-btn.cpb--copied .cpb-check {
    opacity: 1;
    transform: scale(1);
}

.cpb-btn.cpb--copied .cpb-icon,
.cpb-btn.cpb--copied .cpb-label {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* ── Ripple ── */
.cpb-ripple {
    position: absolute;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    background: rgba(90, 175, 212, 0.45);
    transform: scale(0);
    animation: cpb-ripple-anim 0.55s linear;
    pointer-events: none;
}

@keyframes cpb-ripple-anim {
    to {
        transform: scale(25);
        opacity: 0;
    }
}
