/* ==================== LOCATION ANALYSIS STYLES ==================== */

/* Animations */
@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.25);
    }
}

.analysis-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.4s ease;
}

.analysis-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.analysis-modal-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analysis-modal-header h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.analysis-modal-content {
    padding: 24px 32px;
}

.location-summary {
    margin-bottom: 32px;
}

.location-summary h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.location-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.location-info strong {
    display: block;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.location-coords {
    color: #64748b;
    font-size: 14px;
    font-family: monospace;
}

.custom-location-name {
    margin-bottom: 32px;
}

.custom-location-name h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.location-name-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.location-name-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.poi-selection h3 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.poi-description {
    color: #64748b;
    margin-bottom: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.category-option {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.category-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.category-option.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.category-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.category-info h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.category-info p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.analysis-estimate {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #fed7aa;
    margin-bottom: 8px;
}

.estimate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estimate-label {
    color: #92400e;
    font-weight: 600;
}

.estimate-time {
    color: #92400e;
    font-weight: 700;
    font-size: 16px;
}

.analysis-modal-footer {
    padding: 16px 32px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel, .btn-analyze {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 14px;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-analyze {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-analyze:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-analyze:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.analysis-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.error-message {
    color: #dc2626;
    font-weight: 500;
    flex: 1;
}

.error-close {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
}

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

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

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

/* Progress Screen Styles */
.analysis-progress-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

.progress-header {
    padding: 24px 32px 20px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.progress-header h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.progress-header .location-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.progress-header .location-info strong {
    display: block;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.progress-header .location-info span {
    color: #64748b;
    font-size: 14px;
}

.progress-content {
    padding: 32px;
    text-align: center;
}

.progress-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
}

.progress-info {
    margin-bottom: 32px;
}

.progress-status {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-time {
    color: #64748b;
    font-size: 14px;
}

.time-label {
    margin-right: 8px;
}

.time-value {
    font-weight: 600;
    color: #3b82f6;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.step.active {
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    border-color: #3b82f6;
}

.step.completed {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #10b981;
}

.step-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.step-text {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.step.active .step-text {
    color: #3b82f6;
    font-weight: 600;
}

.step.completed .step-text {
    color: #10b981;
    font-weight: 600;
}

.progress-footer {
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.completion-message {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}

.completion-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.completion-text h3 {
    color: #065f46;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.completion-text p {
    color: #047857;
    font-size: 14px;
    margin: 0;
}

.btn-dashboard {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dashboard:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Login Prompt Modal Styles */
.login-prompt-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 540px;
    width: 90%;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-prompt-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-prompt-header h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.login-prompt-content {
    padding: 32px;
    text-align: center;
}

.login-prompt-icon {
    margin-bottom: 24px;
}

.auth-icon {
    font-size: 48px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    animation: subtlePulse 3s ease-in-out infinite;
}

.login-prompt-message {
    margin-bottom: 24px;
}

.login-prompt-message h3 {
    color: #1e293b;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.login-prompt-message p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.login-prompt-benefits {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    text-align: left;
}

.login-prompt-benefits h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.login-prompt-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-prompt-benefits li {
    color: #475569;
    font-size: 15px;
    margin-bottom: 10px;
    padding-left: 0;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}

.login-prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-login, .btn-register {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 15px;
    flex: 1;
    max-width: 200px;
}

.btn-login {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-login:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-register {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-register:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.login-prompt-note {
    padding: 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border-radius: 10px;
    border: 1px solid #fed7aa;
}

.login-prompt-note p {
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .analysis-modal {
        width: 95%;
        margin: 20px;
    }
    
    .analysis-modal-header,
    .analysis-modal-content,
    .analysis-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn-cancel, .btn-analyze {
        width: 100%;
    }
    
    .analysis-progress-modal {
        width: 95%;
        margin: 20px;
    }
    
    .progress-header,
    .progress-content,
    .progress-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 12px;
    }
    
    .completion-message {
        flex-direction: column;
        text-align: center;
    }
    
    .login-prompt-modal {
        width: 95%;
        margin: 20px;
    }
    
    .login-prompt-header,
    .login-prompt-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .login-prompt-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-login, .btn-register {
        width: 100%;
        max-width: none;
    }
}