/* Common CSS styles for the entire application */

/* Alpine.js cloak */
[x-cloak] { 
    display: none !important; 
}

/* Common utility classes */
.hidden {
    display: none !important;
}

/* Navigation styles */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.15s ease-in-out;
}

.nav-link:hover {
    color: #1f2937;
}

.nav-link.active {
    color: #4f46e5;
    border-bottom: 2px solid #4f46e5;
}

.nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 12rem;
    padding: 0.5rem;
    margin-top: 0.25rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dropdown.open .dropdown-content {
    display: block;
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #1f2937;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: white;
    background-color: #4f46e5;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    color: #4b5563;
    background-color: white;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 0.75rem;
    font-weight: 500;
    text-align: left;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Card styles */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 1rem;
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.alert-success {
    color: #065f46;
    background-color: #ecfdf5;
    border: 1px solid #6ee7b7;
}

.alert-error {
    color: #991b1b;
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
