/* ============================================================
   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: 14px 28px;
    border-radius: 8px;
    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;
}

.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 inside button ──────────────────────────────────────── */
.aths-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aths-btn-icon i {
    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;
}


/* Device option cards — unified install popup */
.aths-install-options-modal {
    max-width: 540px;
}

.aths-install-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
    border: 1px solid #e5e5e5;
}

.aths-device-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.aths-device-option {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px 13px;
    background: #fafafa;
}

.aths-device-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: #111;
    line-height: 1.2;
}

.aths-device-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.aths-device-option p {
    margin: 5px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #444;
}

.aths-modal-note {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid #f2f2f2;
    color: #555;
    font-size: 13px;
    line-height: 1.45;
}

@media (min-width: 620px) {
    .aths-device-options {
        grid-template-columns: 1fr 1fr;
    }
}

/* 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;
    }
}

/* Desktop install popup secondary action */
.aths-modal-footer .aths-secondary-btn {
    margin-top: 10px;
    background: #f2f4f7;
    color: #1f2937;
}
.aths-modal-footer .aths-secondary-btn:hover {
    background: #e5e7eb;
}
