/**
 * BrightAster Website
 *
 * @file button.css
 * @description Reusable styles for primary and secondary buttons.
 * @version 1.2 (Text Shift Fix)
 */

/* =================================================================
   PRIMARY BUTTON STYLES
================================================================= */

/* This is the main container for the button animation */
.btn-primary {
    position: relative;
    width: 200px;
    height: 50px;
    margin: 10px; /* Default margin */
}

/* This is the actual clickable link/button */
.btn-primary a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Using your color variables */
    background: var(--divider-color);
    color: var(--primary-color);
    
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--dark-divider-color);
    border-bottom: 1px solid var(--dark-divider-color);
    border-radius: 30px;
    z-index: 1;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    overflow: hidden;
    transition: 0.5s;
    backdrop-filter: blur(15px);

    /* Prevents the text from wrapping into two lines */
    white-space: nowrap;
}

/* Shine effect on hover */
.btn-primary a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(45deg) translateX(0);
    transition: 0.5s;
}

.btn-primary:hover a::before {
    transform: skewX(45deg) translateX(200%);
}

/* Top and bottom animated borders */
.btn-primary::before,
.btn-primary::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 10px;
    
    /* Using your accent color */
    background: var(--accent-color);
    
    border-radius: 10px;
    transition: 0.5s;
    transition-delay: 0s;
    
    /* Glow effect using your accent color */
    box-shadow: 0 0 5px var(--accent-color),
                0 0 15px var(--accent-color),
                0 0 30px var(--accent-color),
                0 0 60px var(--accent-color);
}

.btn-primary::before {
    bottom: -5px;
}

.btn-primary::after {
    top: -5px;
}

.btn-primary:hover::before {
    bottom: 0;
    height: 50%;
    width: 80%;
    border-radius: 30px;
    transition-delay: 0.3s;
}

.btn-primary:hover::after {
    top: 0;
    height: 50%;
    width: 80%;
    border-radius: 30px;
    transition-delay: 0.3s;
}
