/* Custom Styles for NEB Network Admin */

/* Navigation Links */
.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background-color: rgb(99 102 241); /* indigo-500 */
}

.nav-link.active {
    background-color: rgb(67 56 202); /* indigo-700 */
}

/* Modal Styles */
.modal {
    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: 50;
}

.modal.hidden {
    display: none !important;
}

/* Toast Notifications */
.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    color: white;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background-color: rgb(34 197 94); /* green-500 */
}

.toast.error {
    background-color: rgb(239 68 68); /* red-500 */
}

.toast.info {
    background-color: rgb(59 130 246); /* blue-500 */
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Form Section Headings */
.form-section-heading {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgb(107 114 128);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgb(229 231 235);
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
}

/* Duration Shortcut Buttons */
.duration-shortcuts {
    display: flex;
    gap: 0.5rem;
}

.duration-shortcuts button {
    font-size: 0.75rem;
    color: rgb(79 70 229);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgb(199 210 254);
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
}

.duration-shortcuts button:hover {
    background-color: rgb(238 242 255);
}

/* Transform mode toggle transition */
.transition-opacity {
    transition: opacity 0.2s ease;
}

/* Slider Rows (Edit Transformation) */
.slider-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-label {
    width: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(107 114 128);
    text-align: center;
    flex-shrink: 0;
}

.slider-input {
    flex: 1;
    height: 6px;
    appearance: none;
    background: rgb(229 231 235);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgb(79 70 229);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgb(79 70 229);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.slider-number {
    width: 4.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.375rem;
    font-size: 0.8rem;
    text-align: center;
    flex-shrink: 0;
}

.slider-number:focus {
    outline: none;
    border-color: rgb(99 102 241);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Portal Card */
.portal-card {
    border: 1px solid rgb(229 231 235); /* gray-200 */
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.portal-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-color: rgb(165 180 252); /* indigo-300 */
    background-color: rgb(238 242 255); /* indigo-50 */
}

/* Design Card */
.design-card {
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.15s ease;
}

.design-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-color: rgb(134 239 172); /* green-300 */
    background-color: rgb(240 253 244); /* green-50 */
}

/* Location Card */
.location-card {
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.location-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-color: rgb(253 186 116); /* orange-300 */
    background-color: rgb(255 247 237); /* orange-50 */
}

/* Status badges */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.badge-voting {
    background-color: rgb(243 232 255); /* purple-100 */
    color: rgb(126 34 206); /* purple-700 */
}

.badge-information {
    background-color: rgb(219 234 254); /* blue-100 */
    color: rgb(29 78 216); /* blue-700 */
}

.badge-active {
    background-color: rgb(220 252 231); /* green-100 */
    color: rgb(21 128 61); /* green-700 */
}

.badge-ended {
    background-color: rgb(243 244 246); /* gray-100 */
    color: rgb(55 65 81); /* gray-700 */
}

/* Map popup custom styling */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
}

.leaflet-popup-content {
    font-size: 0.875rem;
}

/* Loading spinner */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 4px solid rgb(199 210 254); /* indigo-200 */
    border-top-color: rgb(79 70 229); /* indigo-600 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(243 244 246);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgb(209 213 219);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(156 163 175);
}

/* Results Bar */
.results-bar {
    height: 1rem;
    border-radius: 9999px;
    overflow: hidden;
    background-color: rgb(229 231 235); /* gray-200 */
}

.results-bar-fill {
    height: 100%;
    transition: all 0.5s ease;
}

/* Matrix Preview Canvas */
#matrix-preview-canvas {
    display: block;
    width: 100%;
    height: 100%;
}
