/* Modern Professional Theme - Solar Search App */

/* CSS Variables for easy theming */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --success-hover: #059669;
    --info-color: #06b6d4;
    --info-hover: #0891b2;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* General body styling */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
}

/* Header styling - Modern elevated card */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 100;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Input fields styling */
#searchBox, #country, #minSolarSize {
    font-size: 14px;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    background: var(--bg-white);
    color: var(--text-primary);
    font-weight: 500;
}

#searchBox:focus, #minSolarSize:focus, #country:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

#searchBox {
    flex-grow: 1;
    min-width: 200px;
}

#country {
    min-width: 140px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    padding-right: 36px;
    appearance: none;
}

#minSolarSize {
    width: 140px;
}

/* Button base styling */
button {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: white;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.3px;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

/* Search button */
#searchButton {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

#searchButton:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1e40af 100%);
}

/* Export button */
#exportButton {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-hover) 100%);
}

#exportButton:hover {
    background: linear-gradient(135deg, var(--success-hover) 0%, #047857 100%);
}

/* CRM Import button */
#crmImportButton {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--info-hover) 100%);
}

#crmImportButton:hover {
    background: linear-gradient(135deg, var(--info-hover) 0%, #0e7490 100%);
}

/* Logout button */
#logoutButton {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-hover) 100%);
    margin-left: auto;
}

#logoutButton:hover {
    background: linear-gradient(135deg, var(--danger-hover) 0%, #b91c1c 100%);
}

/* Map container */
#map {
    flex-grow: 1;
    position: relative;
}

/* Status message - Modern toast style */
#status {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    z-index: 1000;
    border: 1px solid var(--border-color);
    max-width: 300px;
}

/* Modal styling - Modern with animations */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-white);
    margin: 10% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin: 0 0 24px 0;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-content button {
    margin-top: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--text-secondary) 0%, var(--text-primary) 100%);
    font-size: 15px;
}

.modal-content button:hover {
    background: linear-gradient(135deg, var(--text-primary) 0%, #020617 100%);
}

/* Google Maps Info Window Custom Styling */
.gm-style .gm-style-iw-c {
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-xl) !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    
    #searchBox {
        flex-basis: 100%;
        order: -1;
    }
    
    button {
        font-size: 13px;
        padding: 8px 16px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }
    
    #status {
        left: 12px;
        bottom: 12px;
        right: 12px;
        font-size: 13px;
        padding: 10px 16px;
    }
}
