/* UI Widget Buttons CSS - WordPress Content AI */

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

/* Base Button Styles */
.btn,
.btn-primary,
.btn-secondary,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #0066CC;
    color: #FFFFFF;
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

/* Button Hover Effects */
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
    background: #0077DD;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Button Active States */
.btn:active,
.btn-primary:active,
.btn-secondary:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

/* Button Focus States */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* Secondary Button Style */
.btn-secondary {
    background: #2A3A40;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #3A4A50;
    box-shadow: 0 4px 12px rgba(42, 58, 64, 0.3);
}

/* Success Button */
.btn-success {
    background: #27ae60;
    color: #FFFFFF;
}

.btn-success:hover {
    background: #2ecc71;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Warning Button */
.btn-warning {
    background: #f39c12;
    color: #FFFFFF;
}

.btn-warning:hover {
    background: #f1c40f;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

/* Danger Button */
.btn-danger {
    background: #e74c3c;
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Info Button */
.btn-info {
    background: #3498db;
    color: #FFFFFF;
}

.btn-info:hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Light Button */
.btn-light {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-light:hover {
    background: #bdc3c7;
    box-shadow: 0 4px 12px rgba(236, 240, 241, 0.3);
}

/* Dark Button */
.btn-dark {
    background: #2c3e50;
    color: #FFFFFF;
}

.btn-dark:hover {
    background: #34495e;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 52px;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
    min-height: 60px;
}

/* Button with Icon */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-icon-only {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only.btn-sm {
    width: 36px;
    height: 36px;
}

.btn-icon-only.btn-lg {
    width: 52px;
    height: 52px;
}

/* Button Groups */
.btn-group {
    display: inline-flex;
    border-radius: 0.375rem;
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.btn-group .btn:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Disabled State */
.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover,
.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
button:disabled:hover,
input[type="submit"]:disabled:hover,
input[type="button"]:disabled:hover,
input[type="reset"]:disabled:hover {
    background: inherit;
    transform: none;
    box-shadow: none;
}

/* Button Outline Variants */
.btn-outline-primary {
    background: transparent;
    color: #0066CC;
    border: 2px solid #0066CC;
}

.btn-outline-primary:hover {
    background: #0066CC;
    color: #FFFFFF;
}

.btn-outline-secondary {
    background: transparent;
    color: #2A3A40;
    border: 2px solid #2A3A40;
}

.btn-outline-secondary:hover {
    background: #2A3A40;
    color: #FFFFFF;
}

.btn-outline-success {
    background: transparent;
    color: #27ae60;
    border: 2px solid #27ae60;
}

.btn-outline-success:hover {
    background: #27ae60;
    color: #FFFFFF;
}

.btn-outline-danger {
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: #FFFFFF;
}

/* Button with Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Floating Action Button */
.btn-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0066CC;
    color: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.btn-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.4);
}

/* Responsive Buttons */
@media (max-width: 768px) {
    .btn,
    .btn-primary,
    .btn-secondary,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .btn-fab {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .btn,
    .btn-primary,
    .btn-secondary,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        min-height: 44px;
        width: 100%;
        max-width: 300px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn-primary,
    .btn-secondary,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        transition: none;
    }
    
    .btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    button:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    input[type="reset"]:hover {
        transform: none;
    }
    
    .btn-loading::after {
        animation: none;
    }
    
    .btn-ripple::before {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn,
    .btn-primary,
    .btn-secondary,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        border: 2px solid currentColor;
    }
    
    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-success,
    .btn-outline-danger {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .btn,
    .btn-primary,
    .btn-secondary,
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"] {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 1px solid #000000 !important;
        box-shadow: none !important;
    }
    
    .btn-fab {
        display: none !important;
    }
}
