/* ============================================================
   Elementor Clean Print – Frontend Styles
   ============================================================ */

/* Floating button wrapper */
.ecp-floating-wrap {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    transition: all 0.2s ease;
}

/* Position variants */
.ecp-floating-wrap[data-pos="bottom-right"] {
    bottom: 32px;
    right: 32px;
}
.ecp-floating-wrap[data-pos="bottom-left"] {
    bottom: 32px;
    left: 32px;
    align-items: flex-start;
}
.ecp-floating-wrap[data-pos="top-right"] {
    top: 80px;
    right: 32px;
}
.ecp-floating-wrap[data-pos="top-left"] {
    top: 80px;
    left: 32px;
    align-items: flex-start;
}

/* Main FAB button */
.ecp-floating-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    color: #fff;
    background: var(--ecp-btn-color, #1a1a2e);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ecp-floating-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s ease;
}

.ecp-floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.14);
}

.ecp-floating-btn:hover::before {
    background: rgba(255, 255, 255, 0.08);
}

.ecp-floating-btn:active {
    transform: translateY(0);
}

/* Icon */
.ecp-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecp-btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Loading state */
.ecp-floating-btn.ecp-loading {
    cursor: not-allowed;
    opacity: 0.85;
}

.ecp-floating-btn.ecp-loading .ecp-btn-icon svg {
    animation: ecp-spin 0.8s linear infinite;
}

@keyframes ecp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Action menu (expanded mode) */
.ecp-action-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ecp-action-menu.ecp-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ecp-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.ecp-action-item:hover {
    transform: translateX(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    color: #1a1a2e;
}

.ecp-action-item svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Rotate main btn arrow when open */
.ecp-floating-btn.ecp-open .ecp-chevron {
    transform: rotate(180deg);
}
.ecp-chevron {
    transition: transform 0.2s ease;
    width: 14px;
    height: 14px;
}

/* Inline button (shortcode / Elementor widget) */
.ecp-print-button-wrap {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ecp-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    color: #fff;
    background: var(--ecp-btn-color, #1a1a2e);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: opacity 0.2s, transform 0.15s;
}

.ecp-inline-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.ecp-inline-btn.ecp-loading {
    cursor: not-allowed;
    opacity: 0.75;
}

/* Print-only: hide everything we don't need */
@media print {
    .ecp-floating-wrap,
    .ecp-print-button-wrap {
        display: none !important;
    }
}
