/* ============================================
   Global Button Styles - PaperWise Theme
   ============================================ */

/* Primary PaperWise Button */
.btn-primary-paperwise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--paperwise-dark-green);
    color: var(--paperwise-accent);
    border-radius: 100px;
    padding: 8px 20px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5714285714;
    letter-spacing: 0.0286em;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary-paperwise:hover {
    background-color: var(--paperwise-dark-green-hover, #0f3329);
    color: var(--paperwise-accent);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 70, 62, 0.3);
}

.btn-primary-paperwise:focus {
    outline: 2px solid var(--paperwise-accent);
    outline-offset: 2px;
}

.btn-primary-paperwise:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(21, 70, 62, 0.3);
}

/* Button Arrow Icon */
.btn-primary-paperwise svg {
    width: 14px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-primary-paperwise:hover svg {
    transform: translateX(8px);
}

/* Secondary PaperWise Button (Outline Style) */
.btn-secondary-paperwise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: var(--paperwise-accent);
    border: 1px solid var(--paperwise-accent);
    border-radius: 100px;
    padding: 7px 19px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5714285714;
    letter-spacing: 0.0286em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary-paperwise:hover {
    background-color: var(--paperwise-accent);
    color: var(--paperwise-dark-green);
    border-color: var(--paperwise-accent);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 213, 159, 0.3);
}

.btn-secondary-paperwise:focus {
    outline: 2px solid var(--paperwise-accent);
    outline-offset: 2px;
}

.btn-secondary-paperwise:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(193, 213, 159, 0.3);
}

.btn-secondary-paperwise svg {
    width: 14px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-secondary-paperwise:hover svg {
    transform: translateX(8px);
}

/* Secondary Dark PaperWise Button (Dark Green Outline Style) */
.btn-secondary-dark-paperwise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: var(--paperwise-dark-green);
    border: 1px solid var(--paperwise-dark-green);
    border-radius: 100px;
    padding: 7px 19px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5714285714;
    letter-spacing: 0.0286em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary-dark-paperwise:hover {
    background-color: var(--paperwise-dark-green);
    color: var(--paperwise-accent);
    border-color: var(--paperwise-dark-green);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 70, 62, 0.3);
}

.btn-secondary-dark-paperwise:focus {
    outline: 2px solid var(--paperwise-dark-green);
    outline-offset: 2px;
}

.btn-secondary-dark-paperwise:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(21, 70, 62, 0.3);
}

.btn-secondary-dark-paperwise svg {
    width: 14px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-secondary-dark-paperwise:hover svg {
    transform: translateX(8px);
}

/* Tertiary PaperWise Button (Text Style) */
.btn-tertiary-paperwise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: var(--paperwise-dark-green);
    border: none;
    border-radius: 100px;
    padding: 8px 12px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5714285714;
    letter-spacing: 0.0286em;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-tertiary-paperwise:hover {
    color: var(--paperwise-dark-green-hover, #0f3329);
    text-decoration: underline;
    transform: translateX(4px);
}

.btn-tertiary-paperwise:focus {
    outline: 2px solid var(--paperwise-dark-green);
    outline-offset: 2px;
}

.btn-tertiary-paperwise svg {
    width: 14px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-tertiary-paperwise:hover svg {
    transform: translateX(8px);
}

/* Responsive Adjustments */
@media (max-width: 576px) {

    .btn-primary-paperwise,
    .btn-secondary-paperwise,
    .btn-secondary-dark-paperwise {
        font-size: 13px;
        padding: 7px 16px;
    }

    .btn-primary-paperwise svg,
    .btn-secondary-paperwise svg,
    .btn-secondary-dark-paperwise svg,
    .btn-tertiary-paperwise svg {
        width: 12px;
        height: 10px;
    }

    .btn-tertiary-paperwise {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Dark Mode Support */
[data-bs-theme="dark"] .btn-primary-paperwise {
    background-color: var(--paperwise-dark-green);
    color: var(--paperwise-accent);
}

[data-bs-theme="dark"] .btn-primary-paperwise:hover {
    background-color: var(--paperwise-dark-green-hover, #0f3329);
    color: var(--paperwise-accent);
}

[data-bs-theme="dark"] .btn-secondary-paperwise {
    background-color: transparent;
    color: var(--paperwise-accent);
    border-color: var(--paperwise-accent);
}

[data-bs-theme="dark"] .btn-secondary-paperwise:hover {
    background-color: var(--paperwise-accent);
    color: var(--paperwise-dark-green);
}

[data-bs-theme="dark"] .btn-secondary-dark-paperwise {
    background-color: transparent;
    color: var(--paperwise-accent);
    border-color: var(--paperwise-accent);
}

[data-bs-theme="dark"] .btn-secondary-dark-paperwise:hover {
    background-color: var(--paperwise-accent);
    color: var(--paperwise-dark-green);
}

[data-bs-theme="dark"] .btn-tertiary-paperwise {
    color: var(--paperwise-accent);
}

[data-bs-theme="dark"] .btn-tertiary-paperwise:hover {
    color: var(--paperwise-accent-light, #d4e3b8);
}

/* Button Sizes */
.btn-paperwise-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-paperwise-lg {
    padding: 10px 24px;
    font-size: 16px;
}

/* Disabled State */
.btn-primary-paperwise:disabled,
.btn-secondary-paperwise:disabled,
.btn-secondary-dark-paperwise:disabled,
.btn-tertiary-paperwise:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading State */
.btn-paperwise-loading {
    position: relative;
    color: transparent;
}

.btn-paperwise-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spinner 0.6s linear infinite;
}

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