/* ==========================================
   Toolza Download Button - Reusable Styles
   ========================================== */

/* Download Button Base */
.toolza-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: var(--font-family);
    line-height: 1;
    min-height: 44px;
    min-width: 44px;
    position: relative;
    overflow: hidden;
}

.toolza-dl-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.toolza-dl-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State */
.toolza-dl-btn--loading {
    pointer-events: none;
    position: relative;
}

.toolza-dl-btn--loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: toolzaDlSpin 0.6s linear infinite;
    right: 12px;
}

@keyframes toolzaDlSpin {
    to { transform: rotate(360deg); }
}

/* Done State */
.toolza-dl-btn--done {
    position: relative;
}

/* Success Block */
.toolza-dl-success {
    text-align: center;
    padding: 40px 0;
}

.toolza-dl-success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--success);
    animation: toolzaDlPopIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes toolzaDlPopIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.toolza-dl-success-heading {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.toolza-dl-success-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.toolza-dl-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.toolza-dl-reset-btn {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .toolza-dl-success-actions {
        flex-direction: column;
        align-items: center;
    }
    .toolza-dl-success-actions .btn,
    .toolza-dl-success-actions .toolza-dl-btn {
        width: 100%;
        max-width: 280px;
    }
}
