/* Infinium Equipment Dashboard Custom CSS - Scoped to prevent conflicts */

/* Scope all styles under the plugin's unique wrapper */
.infinium-dashboard-wrapper {
    /* Base container styles */
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #ffffff;
    min-height: 100vh;
}

/* Login screen styles */
.infinium-dashboard-wrapper.min-h-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f7fa 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.infinium-dashboard-wrapper .login-container {
    background-color: #ffffff;
    border-radius: 1.75rem;
    box-shadow: 0 20px 40px -10px rgba(0, 50, 100, 0.2);
    padding: 2.5rem;
    max-width: 30rem;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(2, 132, 199, 0.1);
}

.infinium-dashboard-wrapper .login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0284c7, #0369a1);
}

.infinium-dashboard-wrapper .login-title {
    color: #0284c7;
    font-size: 1.75rem;
    line-height: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.infinium-dashboard-wrapper .login-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 2.25rem;
    line-height: 1.5;
    opacity: 0.85;
}

.infinium-dashboard-wrapper .login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.infinium-dashboard-wrapper .login-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #f8fafc;
}

.infinium-dashboard-wrapper .login-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.infinium-dashboard-wrapper .login-checkbox-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: -0.5rem;
}

.infinium-dashboard-wrapper .login-checkbox-label {
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.infinium-dashboard-wrapper .login-checkbox-label:hover {
    color: #0284c7;
}

.infinium-dashboard-wrapper .login-checkbox {
    margin-right: 0.5rem;
    accent-color: #0284c7;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.infinium-dashboard-wrapper .login-button {
    width: 100%;
    padding: 1.1rem;
    background-color: #0284c7;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.3);
    position: relative;
    overflow: hidden;
}

.infinium-dashboard-wrapper .login-button:hover {
    background-color: #0369a1;
    box-shadow: 0 6px 8px -2px rgba(2, 132, 199, 0.4);
    transform: translateY(-2px);
}

.infinium-dashboard-wrapper .login-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px -1px rgba(2, 132, 199, 0.3);
}

.infinium-dashboard-wrapper .login-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.infinium-dashboard-wrapper .login-button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.infinium-dashboard-wrapper .login-footer {
    margin-top: 1.75rem;
    color: #64748b;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Dashboard styles */
.infinium-dashboard-wrapper .dashboard-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #ffffff;
    min-height: 100vh;
}

.infinium-dashboard-wrapper .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.infinium-dashboard-wrapper .page-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    color: #1e2937;
}

.infinium-dashboard-wrapper .button-group {
    display: flex;
    gap: 1rem;
}

.infinium-dashboard-wrapper .action-button {
    width: 8rem;
    padding: 0.75rem 0;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinium-dashboard-wrapper .customize-btn {
    background-color: #374151;
}

.infinium-dashboard-wrapper .customize-btn:hover {
    background-color: #2d3748;
}

.infinium-dashboard-wrapper .add-btn {
    background-color: #0284c8;
}

.infinium-dashboard-wrapper .add-btn:hover {
    background-color: #0369a1;
}

.infinium-dashboard-wrapper .clear-btn {
    background-color: #64748b;
}

.infinium-dashboard-wrapper .clear-btn:hover {
    background-color: #475569;
}

.infinium-dashboard-wrapper .logout-btn {
    background-color: #dc2626;
}

.infinium-dashboard-wrapper .logout-btn:hover {
    background-color: #b91c1c;
}

.infinium-dashboard-wrapper .disabled:opacity-50 {
    opacity: 0.5;
    cursor: not-allowed;
}

.infinium-dashboard-wrapper .filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.infinium-dashboard-wrapper .filter-select {
    width: 18rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    font-size: 1.125rem;
    background-color: #ffffff;
    outline: none;
}

.infinium-dashboard-wrapper .filter-select:focus {
    border-color: #0284c8;
}

.infinium-dashboard-wrapper .filter-select.category {
    flex: 1;
    min-width: 200px;
}

.infinium-dashboard-wrapper .filter-search {
    flex: 1;
    min-width: 240px;
    padding: 0.75rem 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    font-size: 1.125rem;
    outline: none;
}

.infinium-dashboard-wrapper .filter-search:focus {
    border-color: #0284c8;
}

.infinium-dashboard-wrapper .filter-button {
    padding: 0.75rem 1.5rem;
    background-color: #1e2937;
    color: #ffffff;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.infinium-dashboard-wrapper .filter-button:hover {
    background-color: #000000;
}

.infinium-dashboard-wrapper .filter-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.infinium-dashboard-wrapper .footer-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Modal styles */
.infinium-dashboard-wrapper .modal-hidden {
    display: none;
}

/* Searchable Dropdown Styles */
.infinium-dashboard-wrapper .searchable-dropdown {
    position: relative;
    width: 100%;
}

.infinium-dashboard-wrapper .searchable-input {
    width: 100%;
    padding: 0.95rem 1.5rem;
    border: 1px solid rgba(209, 213, 219, 0.5);
    border-radius: 1rem;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05), inset 0 1px 2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.infinium-dashboard-wrapper .searchable-input:focus {
    border-color: #0284c8;
    box-shadow: 0 0 0 3px rgba(2, 132, 200, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.infinium-dashboard-wrapper .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.infinium-dashboard-wrapper .dropdown-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
    color: #374151;
}

.infinium-dashboard-wrapper .dropdown-item:hover {
    background-color: rgba(2, 132, 200, 0.1);
}

.infinium-dashboard-wrapper .dropdown-item.focused {
    background-color: rgba(2, 132, 200, 0.15);
    color: #0284c8;
    font-weight: 500;
}

.infinium-dashboard-wrapper .modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: auto;
}

.infinium-dashboard-wrapper .modal-content {
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
    position: relative;
}

.infinium-dashboard-wrapper .modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    z-index: 10;
}

.infinium-dashboard-wrapper .modal-close-btn:hover {
    color: #4b5563;
}

.infinium-dashboard-wrapper .modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0284c8;
    margin-bottom: 2rem;
    text-align: center;
}

.infinium-dashboard-wrapper .modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.infinium-dashboard-wrapper .modal-field-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.infinium-dashboard-wrapper .modal-label {
    font-size: 0.875rem;
    font-weight: medium;
    color: #4b5563;
}

.infinium-dashboard-wrapper .modal-input,
.infinium-dashboard-wrapper .modal-select {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
}

.infinium-dashboard-wrapper .modal-input:focus,
.infinium-dashboard-wrapper .modal-select:focus {
    border-color: #0284c8;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.infinium-dashboard-wrapper .modal-textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    min-height: 100px;
    resize: vertical;
}

.infinium-dashboard-wrapper .modal-textarea:focus {
    border-color: #0284c8;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.infinium-dashboard-wrapper .modal-button-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.infinium-dashboard-wrapper .modal-button {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.infinium-dashboard-wrapper .modal-save-btn {
    background-color: #0284c8;
    color: #ffffff;
}

.infinium-dashboard-wrapper .modal-save-btn:hover {
    background-color: #0369a1;
    transform: translateY(-1px);
}

.infinium-dashboard-wrapper .modal-delete-btn {
    background-color: #dc2626;
    color: #ffffff;
}

.infinium-dashboard-wrapper .modal-delete-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.infinium-dashboard-wrapper .modal-cancel-btn {
    background-color: #e5e7eb;
    color: #1f2937;
}

.infinium-dashboard-wrapper .modal-cancel-btn:hover {
    background-color: #d1d5db;
    transform: translateY(-1px);
}

/* Ensure DataTables styles are scoped and prevent conflicts */
.infinium-dashboard-wrapper table.dataTable {
    width: 100% !important;
    margin: 0 auto;
    clear: both;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    border: 1px solid #e1e1e1;
    background-color: #ffffff;
}

.infinium-dashboard-wrapper table.dataTable thead th,
.infinium-dashboard-wrapper table.dataTable tfoot th {
    font-weight: bold;
    padding: 12px 18px;
    border-bottom: 2px solid #e1e1e1;
    background-color: #f8f9fa;
    color: #495057;
    text-align: left;
}

.infinium-dashboard-wrapper table.dataTable tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #e1e1e1;
    color: #343a40;
}

.infinium-dashboard-wrapper table.dataTable tbody tr:last-child td {
    border-bottom: 0;
}

.infinium-dashboard-wrapper table.dataTable tbody tr:hover {
    background-color: #f1f5f9;
}

/* Custom button styles within DataTables */
.infinium-dashboard-wrapper .edit-btn {
    padding: 0.5rem 1.25rem;
    background-color: #059669;
    color: #ffffff;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.infinium-dashboard-wrapper .edit-btn:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(5, 150, 105, 0.3);
}
