/* ============================================================
   install Digital card — Styles
   ============================================================ */

/* ── Button Wrapper ──────────────────────────────────────────── */
.aths-button-wrap {
    display: block;
    width: 100%;
}

/* ── The Button ──────────────────────────────────────────────── */
.aths-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    background-color: #2271b1;
    color: #ffffff;
    padding: 17px 36px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition:
        background-color 0.22s ease,
        transform 0.15s ease,
        box-shadow 0.22s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* ── Animated Click Hand Icon ────────────────────────────────── */
.aths-btn-icon .aths-pointer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 22px;
    height: 22px;
}

.aths-btn-icon .aths-pointer-icon svg {
    width: 22px;
    height: 22px;
    animation: aths-hand-click 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: bottom center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}

/* Ripple ring on click */
.aths-btn-icon .aths-pointer-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    animation: aths-hand-ripple 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes aths-hand-click {
    0%   { transform: translateY(0)   rotate(0deg)    scale(1);    }
    18%  { transform: translateY(3px) rotate(-8deg)   scale(0.88); }
    32%  { transform: translateY(0)   rotate(0deg)    scale(1);    }
    50%  { transform: translateY(3px) rotate(-8deg)   scale(0.88); }
    64%  { transform: translateY(0)   rotate(0deg)    scale(1);    }
    100% { transform: translateY(0)   rotate(0deg)    scale(1);    }
}

@keyframes aths-hand-ripple {
    0%   { transform: translateX(-50%) scale(0);   opacity: 0.7; }
    18%  { transform: translateX(-50%) scale(0);   opacity: 0.7; }
    35%  { transform: translateX(-50%) scale(3.5); opacity: 0;   }
    50%  { transform: translateX(-50%) scale(0);   opacity: 0.7; }
    67%  { transform: translateX(-50%) scale(3.5); opacity: 0;   }
    100% { transform: translateX(-50%) scale(0);   opacity: 0;   }
}

/* ── FA icon pulse (when custom icon selected) ───────────────── */
.aths-btn-icon i {
    display: inline-block;
    animation: aths-icon-pulse 2s ease-in-out infinite;
    font-size: 18px;
    line-height: 1;
}

@keyframes aths-icon-pulse {
    0%   { transform: scale(1);    opacity: 1;    }
    50%  { transform: scale(1.28); opacity: 0.82; }
    100% { transform: scale(1);    opacity: 1;    }
}

.aths-add-button:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 3px;
}

.aths-add-button:hover {
    background-color: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.aths-add-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ── Icon wrapper ────────────────────────────────────────────── */
.aths-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.aths-btn-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Installed state ─────────────────────────────────────────── */
.aths-add-button.aths-installed {
    background-color: #28a745 !important;
    cursor: default;
    pointer-events: none;
}

.aths-add-button.aths-installed:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ── Ripple on click ─────────────────────────────────────────── */
.aths-add-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.aths-add-button:active::after {
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════════════════ */

.aths-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 999999;
    padding: 0;
    animation: aths-fade-in 0.2s ease forwards;
}

@media (min-width: 480px) {
    .aths-modal-overlay {
        align-items: center;
        padding: 16px;
    }
}

.aths-modal {
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    animation: aths-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
}

@media (min-width: 480px) {
    .aths-modal {
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: aths-slide-up-center 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    }
}

/* Drag handle (mobile feel) */
.aths-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
}

@media (min-width: 480px) {
    .aths-modal::before { display: none; }
}

/* Header */
.aths-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 0;
}

.aths-modal-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.aths-modal-close {
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.18s, color 0.18s;
    flex-shrink: 0;
}

.aths-modal-close:hover {
    background-color: #e0e0e0;
    color: #111;
}

/* Body */
.aths-modal-body {
    padding: 14px 22px 10px;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

.aths-modal-desc {
    margin: 0 0 14px;
    color: #555;
    font-size: 14px;
}

/* Steps list — iOS */
.aths-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aths-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #f2f2f2;
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}

.aths-steps li:first-child {
    border-top: none;
}

.aths-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.aths-step-text {
    flex: 1;
}

.aths-share-icon {
    width: 17px;
    height: 17px;
    vertical-align: -3px;
    stroke: #2271b1;
    display: inline-block;
}

/* Browser list — desktop/other */
.aths-browser-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aths-browser-list li {
    padding: 9px 0;
    border-top: 1px solid #f2f2f2;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.aths-browser-list li:first-child {
    border-top: none;
}

/* Footer */
.aths-modal-footer {
    padding: 12px 22px 22px;
    display: flex;
    justify-content: stretch;
}

.aths-modal-btn {
    flex: 1;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
    font-family: inherit;
}

.aths-modal-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.aths-modal-btn:active {
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
════════════════════════════════════════════════════════════════ */

.aths-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
    max-width: min(90vw, 380px);
    text-align: center;
    line-height: 1.45;
}

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

.aths-toast.aths-toast-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.aths-toast.aths-toast-info {
    background: linear-gradient(135deg, #2271b1, #135e96);
}

/* ════════════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════════════ */

@keyframes aths-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes aths-slide-up {
    from { opacity: 0; transform: translateY(80px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes aths-slide-up-center {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Reduce motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .aths-modal-overlay,
    .aths-modal,
    .aths-toast,
    .aths-add-button {
        animation: none;
        transition: none;
    }
}
