/* Loading States and Spinners */

/* Login Layout Styles */
.login-layout {
    min-height: 100vh;
    /* background: #f8fafc; */
}

/* Dropdown Menu Fixes */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown__trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dropdown__trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown__menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

/* Right-side dropdown */
.dropdown__menu--right {
    position: absolute;
    top: 0;
    left: 100%;
    right: auto;
    margin-left: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: all 0.2s ease;
}

.dropdown-right {
    position: relative;
}

.dropdown__menu--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s;
}

.dropdown__item:hover {
    background-color: #f3f4f6;
}

.dropdown__item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown__item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown__item svg {
    color: #6b7280;
}

/* Empty State Styles */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 2rem;
}

.empty-state__content {
    text-align: center;
    max-width: 400px;
}

.empty-state__icon {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state__description {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Loading Spinner Styles */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 32px;
    height: 32px;
}

.spinner--small {
    width: 16px;
    height: 16px;
}

.spinner--medium {
    width: 32px;
    height: 32px;
}

.spinner--large {
    width: 48px;
    height: 48px;
}

.spinner .path {
    stroke: #3B82F6;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Button Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

.btn.loading:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes button-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Page Loading Overlay */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.page-loading .spinner {
    width: 48px;
    height: 48px;
}

/* Inline Loading States */
.loading-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-inline .spinner {
    width: 16px;
    height: 16px;
}

/* Table Loading State */
.table-loading {
    position: relative;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Loading State */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

/* Skeleton Loading (for future use) */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 2.5rem;
    border-radius: 6px;
    width: 100px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
} */

/* .btn--primary {
    background: #3b82f6;
    color: white;
}

.btn--primary:hover {
    background: #2563eb;
}

.btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn--secondary:hover {
    background: #e5e7eb;
} */

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-state__content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state__icon {
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state__icon svg {
    width: 64px;
    height: 64px;
    fill: #d1d5db;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.empty-state__description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
}
