/* CA Copy Widget v3 */
.ccw-outer { width: 100%; }

.ccw-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #1a1a2e;
    border: 2px solid #2e2e4a;
    border-style: solid;
    border-radius: 14px;
    padding: 10px 12px;
    box-sizing: border-box;
    gap: 0;
}

/* Badge */
.ccw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 7px;
    padding: 5px 9px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

/* Address text */
.ccw-address {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    color: #e8e8f0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    user-select: all;
    cursor: text;
}

/* Button */
.ccw-btn {
    background-color: #f5c400;
    color: #1a1400;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none !important;
    border-radius: 9px;
    padding: 8px 18px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
    line-height: 1;
    transition: background-color 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    -webkit-appearance: none;
}
.ccw-btn:hover  { background-color: #e6b800; }
.ccw-btn:active { transform: scale(0.97); }
.ccw-btn:focus  { outline: 2px solid #f5c400; outline-offset: 2px; }

/* ── POPUP TOAST ── */
.ccw-toast {
    position: fixed;
    z-index: 999999;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-width: 340px;
    white-space: nowrap;
}

.ccw-toast.ccw-toast--show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ccw-toast.ccw-toast--hide {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s;
}

/* Icon inside toast */
.ccw-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.ccw-toast--success .ccw-toast-icon { background: rgba(255,255,255,0.2); }
.ccw-toast--error   .ccw-toast-icon { background: rgba(255,255,255,0.2); }

/* Positions */
.ccw-toast--top-center    { top: 28px;    left: 50%; transform: translateX(-50%) translateY(-12px) scale(0.96); }
.ccw-toast--top-right     { top: 28px;    right: 28px; }
.ccw-toast--top-left      { top: 28px;    left: 28px; }
.ccw-toast--bottom-center { bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px) scale(0.96); }
.ccw-toast--bottom-right  { bottom: 28px; right: 28px; }
.ccw-toast--bottom-left   { bottom: 28px; left: 28px; }

.ccw-toast--top-center.ccw-toast--show    { transform: translateX(-50%) translateY(0) scale(1); }
.ccw-toast--bottom-center.ccw-toast--show { transform: translateX(-50%) translateY(0) scale(1); }
.ccw-toast--top-center.ccw-toast--hide    { transform: translateX(-50%) translateY(-12px) scale(0.96); }
.ccw-toast--bottom-center.ccw-toast--hide { transform: translateX(-50%) translateY(12px) scale(0.96); }

@media (max-width: 480px) {
    .ccw-badge   { font-size: 11px; padding: 4px 7px; }
    .ccw-address { font-size: 11px; }
    .ccw-btn     { font-size: 11px; padding: 7px 12px; }
    .ccw-toast   { font-size: 13px; padding: 10px 16px; max-width: calc(100vw - 32px); }
}
