/* hevservice Modal Styles - Light & Dark Mode */
/* Based on hevservice EV Charging Station Finder App UI Kit */

/* CSS Variables for theming - Light Mode (Default) */
:root {
    --hevservice-primary: #0085c8;
    --hevservice-primary-hover: #0d6efd;
    --hevservice-bg: #ffffff;
    --hevservice-text: #1f2937;
    --hevservice-text-secondary: #6b7280;
    --hevservice-border: #e5e7eb;
    --hevservice-input-bg: #ffffff;
    --hevservice-input-border: #0085c8;
    --hevservice-modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --hevservice-avatar-bg: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    --hevservice-avatar-icon-color: #9ca3af;
}

/* Body full height mobile */
html, body {
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

body {
    display: flex;
    flex-direction: column;
}

/* Dark mode - Only when .dark-mode class is applied to body or modal */
.dark-mode .hevservice-modal,
.hevservice-modal.dark-mode {
    --hevservice-bg: #1a1a2e;
    --hevservice-text: #ffffff;
    --hevservice-text-secondary: #9ca3af;
    --hevservice-border: #374151;
    --hevservice-input-bg: #1a1a2e;
    --hevservice-modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --hevservice-avatar-bg: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    --hevservice-avatar-icon-color: #6b7280;
}

/* Modal Content */
.hevservice-modal {
    background-color: var(--hevservice-bg) !important;
    border: none !important;
    border-radius: 24px !important;
    box-shadow: var(--hevservice-modal-shadow) !important;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Header */
.hevservice-modal-header {
    padding: 20px 24px 0;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hevservice-back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--hevservice-text);
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.hevservice-back-btn:hover {
    background-color: var(--hevservice-border);
}

/* Theme Toggle Button */
.hevservice-theme-toggle {
    background: none;
    border: 2px solid var(--hevservice-border);
    font-size: 1.2rem;
    color: var(--hevservice-text);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hevservice-theme-toggle:hover {
    border-color: var(--hevservice-primary);
    color: var(--hevservice-primary);
}

.hevservice-theme-toggle .bi-moon-fill {
    color: #6366f1;
}

.hevservice-theme-toggle .bi-sun-fill {
    color: #f59e0b;
}

/* Modal Body */
.hevservice-modal-body {
    padding: 16px 24px 24px;
}

/* Title */
.hevservice-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hevservice-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hevservice-emoji {
    font-size: 1.5rem;
}

.hevservice-subtitle {
    font-size: 0.95rem;
    color: var(--hevservice-text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Avatar Container */
.hevservice-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    position: relative;
}

.hevservice-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--hevservice-avatar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #0085c8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.hevservice-avatar-icon {
    font-size: 3rem;
    color: var(--hevservice-avatar-icon-color);
}

.hevservice-avatar-edit {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(30px);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--hevservice-primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.hevservice-avatar-edit:hover {
    background-color: var(--hevservice-primary-hover);
}

.hevservice-avatar-edit i {
    font-size: 0.9rem;
}

/* Form Groups */
.hevservice-form-group {
    margin-bottom: 20px;
}

.hevservice-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hevservice-text);
    margin-bottom: 8px;
}

.hevservice-input {
    width: 100%;
    padding: 14px 0;
    font-size: 1rem;
    color: var(--hevservice-text);
    background-color: var(--hevservice-input-bg);
    border: none;
    border-bottom: 2px solid var(--hevservice-input-border);
    outline: none;
    transition: border-color 0.2s;
}

.hevservice-input::placeholder {
    color: var(--hevservice-text-secondary);
    opacity: 0.7;
}

.hevservice-input:focus {
    border-bottom-color: var(--hevservice-primary);
}

/* Select with icon */
.hevservice-select-wrapper {
    position: relative;
}

.hevservice-select {
    width: 100%;
    padding: 14px 40px 14px 0;
    font-size: 1rem;
    color: var(--hevservice-text);
    background-color: var(--hevservice-input-bg);
    border: none;
    border-bottom: 2px solid var(--hevservice-input-border);
    outline: none;
    appearance: none;
    cursor: pointer;
}

.hevservice-select-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hevservice-primary);
    pointer-events: none;
}

/* Date input with icon */
.hevservice-date-wrapper {
    position: relative;
}

.hevservice-date-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hevservice-primary);
    pointer-events: none;
    font-size: 1.25rem;
}

/* Checkbox */
.hevservice-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.hevservice-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--hevservice-primary);
    cursor: pointer;
}

.hevservice-checkbox-label {
    font-size: 0.9rem;
    color: var(--hevservice-text-secondary);
    cursor: pointer;
}

.hevservice-link {
    color: var(--hevservice-primary);
    text-decoration: none;
    font-weight: 500;
}

.hevservice-link:hover {
    text-decoration: underline;
}

/* Modal Footer */
.hevservice-modal-footer {
    padding: 16px 24px 24px;
    background: transparent;
    border: none;
}

.hevservice-btn-primary {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--hevservice-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.hevservice-btn-primary:hover {
    background-color: var(--hevservice-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.hevservice-btn-primary:active {
    transform: translateY(0);
}

/* Alert styling inside modal */
.hevservice-modal .alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
}

.hevservice-modal .alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.dark-mode .hevservice-modal .alert-danger,
.hevservice-modal.dark-mode .alert-danger {
    background-color: #450a0a;
    color: #fecaca;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .hevservice-modal {
        margin: 10px;
        border-radius: 20px !important;
    }
    
    .hevservice-title {
        font-size: 1.5rem;
    }
    
    .hevservice-avatar {
        width: 100px;
        height: 100px;
    }
    
    .hevservice-avatar-icon {
        font-size: 2.5rem;
    }
    
    .hevservice-modal-body {
        padding: 16px 20px 20px;
    }
    
    .hevservice-modal-footer {
        padding: 12px 20px 20px;
    }
}

/* Scrollbar styling for modal */
.hevservice-modal::-webkit-scrollbar {
    width: 6px;
}

.hevservice-modal::-webkit-scrollbar-track {
    background: transparent;
}

.hevservice-modal::-webkit-scrollbar-thumb {
    background-color: var(--hevservice-border);
    border-radius: 3px;
}

/* Animation for modal */
.modal.fade .hevservice-modal {
    transform: translateY(20px);
    transition: transform 0.3s ease-out;
}

.modal.show .hevservice-modal {
    transform: translateY(0);
}

