/* Button styles */

/* Apply cursor pointer to make sure buttons look clickable */
.btn {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Button loading animation */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
    transition: all 0.3s ease;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.2em;
    height: 1.2em;
    top: 50%;
    left: 50%;
    margin-top: -0.6em;
    margin-left: -0.6em;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    animation: btn-spinner 0.8s linear infinite;
    z-index: 2;
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Button hover effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
}

/* Primary button with loading state */
.btn-primary.btn-loading {
    background-color: var(--primary-color);
}

/* Outline button with loading state */
.btn-outline.btn-loading::after {
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--primary-color);
}

/* Download button special effects */
#generateCV {
    position: relative;
    transition: all 0.3s ease;
}

#generateCV:hover {
    cursor: pointer;
    transform: translateY(-2px);
}

.btn-active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
}

#generateCV.btn-active {
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3) !important;
}

/* Fix icon spacing in buttons */
.btn i {
    margin-right: 10px; /* Adjust spacing between icon and text */
}

/* Button ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}