/* Universal Button Styling System for EmploymentOnboarding */
/* This file provides consistent button styling across the entire application */

/* Reset any existing button styles to ensure consistency */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 6px !important;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    line-height: 1.5;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    vertical-align: middle;
}

/* Standard button sizes */
.btn-xs {
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    min-height: 24px;
    min-width: 32px;
}

.btn-sm, 
.btn-group-sm .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    min-height: 32px;
    min-width: 44px;
}

.btn,
.btn-md {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 38px;
    min-width: 44px;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    min-height: 44px;
    min-width: 44px;
}

/* Primary buttons - main actions */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border-color: #007bff !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    border-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
    color: #ffffff !important;
}

.btn-primary:active {
    background: linear-gradient(135deg, #004085 0%, #003366 100%) !important;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Secondary buttons - alternative actions */
.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.15);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #545b62 !important;
    border-color: #4e555b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.25);
    color: #ffffff !important;
}

/* Success buttons - positive actions */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.15);
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%) !important;
    border-color: #1e7e34 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.25);
    color: #ffffff !important;
}

/* Danger buttons - destructive actions */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.15);
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    border-color: #c82333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.25);
    color: #ffffff !important;
}

/* Warning buttons - caution actions */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.15);
}

.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%) !important;
    border-color: #e0a800 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.25);
    color: #212529 !important;
}

/* Info buttons - informational actions */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    border-color: #17a2b8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.15);
}

.btn-info:hover,
.btn-info:focus {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%) !important;
    border-color: #138496 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.25);
    color: #ffffff !important;
}

/* Outline button variants */
.btn-outline-primary {
    background-color: transparent !important;
    border-color: #007bff !important;
    color: #007bff !important;
    box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.btn-outline-secondary {
    background-color: transparent !important;
    border-color: #6c757d !important;
    color: #6c757d !important;
    box-shadow: none;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.15);
}

.btn-outline-success {
    background-color: transparent !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
    box-shadow: none;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.15);
}

.btn-outline-danger {
    background-color: transparent !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
    box-shadow: none;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.15);
}

.btn-outline-warning {
    background-color: transparent !important;
    border-color: #ffc107 !important;
    color: #856404 !important;
    box-shadow: none;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.15);
}

.btn-outline-info {
    background-color: transparent !important;
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
    box-shadow: none;
}

.btn-outline-info:hover,
.btn-outline-info:focus {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.15);
}

/* Light variants */
.btn-light {
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    color: #212529 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-light:hover,
.btn-light:focus {
    background-color: #e2e6ea !important;
    border-color: #dae0e5 !important;
    color: #212529 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-dark {
    background-color: #343a40 !important;
    border-color: #343a40 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(52, 58, 64, 0.15);
}

.btn-dark:hover,
.btn-dark:focus {
    background-color: #23272b !important;
    border-color: #1d2124 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 58, 64, 0.25);
}

/* Disabled state for all buttons */
.btn:disabled,
.btn.disabled,
.btn[disabled] {
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Button groups */
.btn-group .btn {
    margin-right: 0;
    border-radius: 6px !important;
}

.btn-group .btn:not(:first-child) {
    margin-left: 0.25rem;
}

.btn-group .btn:first-child {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

.btn-group .btn:last-child {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}

/* Toolbar buttons */
.btn-toolbar .btn-group {
    margin-right: 0.5rem;
}

.btn-toolbar .btn-group:last-child {
    margin-right: 0;
}

/* Icon spacing */
.btn i {
    margin-right: 0.375rem;
}

.btn i:last-child:first-child {
    margin-right: 0;
    margin-left: 0;
}

.btn i:only-child {
    margin-right: 0;
}

/* Round/circular buttons */
.btn.rounded-circle {
    border-radius: 50% !important;
    padding: 0.5rem !important;
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.btn.rounded-circle i {
    margin: 0;
}

/* Loading state */
.btn .spinner-border,
.btn .spinner-border-sm {
    margin-right: 0.375rem;
}

/* Dropdown toggle buttons */
.btn.dropdown-toggle::after {
    margin-left: 0.375rem;
}

/* Dropdown toggle button sizing consistency */
.btn-group-sm .btn.dropdown-toggle,
.btn-sm.dropdown-toggle {
    min-height: 32px !important;
    min-width: 44px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure dropdown toggle arrow spacing is consistent */
.btn-sm.dropdown-toggle::after,
.btn-group-sm .btn.dropdown-toggle::after {
    margin-left: 0.25rem !important;
    vertical-align: middle !important;
}

/* Fix dropdown toggle button alignment in button groups */
.btn-group .btn.dropdown-toggle {
    border-radius: 6px !important;
}

/* Ensure consistent height for all button types in groups */
.btn-group-sm .btn,
.btn-group-sm .dropdown .btn {
    min-height: 32px !important;
    min-width: 44px !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none !important;
        transform: none !important;
    }
    
    .btn:hover,
    .btn:focus {
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px !important;
    }
    
    .btn-outline-primary,
    .btn-outline-secondary,
    .btn-outline-success,
    .btn-outline-danger,
    .btn-outline-warning,
    .btn-outline-info {
        border-width: 3px !important;
    }
}

/* Focus states for keyboard navigation */
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* DevExpress button consistency */
.dx-button {
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dx-button-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border-color: #28a745 !important;
}

.dx-button-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border-color: #dc3545 !important;
}

/* Special cases for quick access buttons */
.quick-access-btn {
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px);
}

.quick-access-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* ===================================================
   UNIFIED PAGE HEADINGS SYSTEM
   =================================================== */

/* Main page headings */
.page-header {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem 1rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: inherit;
}

.page-header .page-icon {
    font-size: 1.75rem;
    color: #007bff;
    flex-shrink: 0;
}

.page-header .page-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #6c757d;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Section headings within pages */
.section-header {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2,
.section-header h3,
.section-header h4,
.section-header h5 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: inherit;
}

.section-header .section-icon {
    font-size: 1.25rem;
    color: #007bff;
    flex-shrink: 0;
}

/* Card header headings */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    margin: 0;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.card-header h1 { font-size: 1.75rem; }
.card-header h2 { font-size: 1.5rem; }
.card-header h3 { font-size: 1.25rem; }
.card-header h4 { font-size: 1.125rem; }
.card-header h5 { font-size: 1rem; }
.card-header h6 { font-size: 0.875rem; }

/* Standardized heading classes */
.heading-primary {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.heading-secondary {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 1rem;
}

.heading-tertiary {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.75rem;
}

/* Page title with icon pattern */
.page-title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.page-title-with-icon i {
    font-size: 1.75rem;
    color: #007bff;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem 1.5rem 0.75rem 1.5rem;
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .page-header h1,
    .page-header h2,
    .page-header h3,
    .page-header h4,
    .heading-primary {
        font-size: 1.75rem;
    }
    
    .section-header h2,
    .section-header h3,
    .section-header h4,
    .section-header h5,
    .heading-secondary {
        font-size: 1.25rem;
    }
    
    .page-title-with-icon {
        font-size: 1.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 0.75rem 1rem 0.5rem 1rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .section-header {
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .page-header h1,
    .page-header h2,
    .page-header h3,
    .page-header h4,
    .heading-primary {
        font-size: 1.5rem;
    }
    
    .page-title-with-icon {
        font-size: 1.5rem;
    }
    
    .page-header .ms-auto {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .page-header .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Print styles */
@media print {
    .btn {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    
    .page-header,
    .section-header,
    .page-title-with-icon {
        border-bottom: 1px solid #000;
        color: #000;
    }
    
    .page-header .page-icon,
    .section-header .section-icon,
    .page-title-with-icon i {
        color: #000;
    }
}
