/* Frontend CSS - assets/css/frontend.css */

/* Reset ve base styles */
.solar-panel-calculator * {
    box-sizing: border-box;
}

/* Ana container - Tam genişlik ve modern tasarım */
#solar-panel-calculator {
    position: relative;
    min-height: 700px;
    height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.solar-panel-container {
    display: flex;
    height: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Sol panel - Arama ve kontroller */
.solar-panel-sidebar {
    width: 400px;
    min-width: 400px;
    background: linear-gradient(180deg, #f8faff 0%, #f0f4ff 100%);
    border-right: 2px solid #e2e8f0;
    padding: 25px;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

.solar-panel-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 3px 3px 0 0;
}

/* Panel başlıkları */
.panel-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.panel-section:hover::before {
    transform: scaleY(1);
}

.panel-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.panel-section h4 {
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.panel-section h4 i {
    margin-right: 12px;
    font-size: 20px;
    padding: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
}

/* Talimat paneli */
.instructions-panel {
    background: linear-gradient(135deg, #e0f2fe 0%, #e8f5e8 100%);
}

.instruction-steps {
    margin-top: 16px;
}

.step {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.step:last-child {
    border-bottom: none;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-text {
    color: #475569;
    font-size: 15px;
    line-height: 1.5;
    margin-top: 4px;
}

/* Form kontrolleri */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    width: 100%;
    font-family: inherit;
    color: #1e293b;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-control:disabled {
    background-color: #f8fafc;
    opacity: 0.7;
    cursor: not-allowed;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

/* Özel select kutuları */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 45px;
    appearance: none;
    cursor: pointer;
}

/* Butonlar */
.btn {
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 52px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn i {
    margin-right: 10px;
    font-size: 16px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover:not(:disabled)::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 116, 139, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    color: white;
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

.btn.active {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
}

/* Ölçüm bilgileri grid'i */
.measurement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.measurement-card {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.measurement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.measurement-card:hover::before {
    transform: scaleX(1);
}

.measurement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.measurement-card .icon {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 12px;
    display: block;
}

.measurement-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.2;
}

.measurement-card .label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Fiyat kartı özel */
.price-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    text-align: center;
    margin-top: 16px;
}

.price-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 600;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

/* Harita alanı */
.solar-panel-map {
    flex: 1;
    position: relative;
    background: #f8fafc;
}

#solar-map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Harita hata durumu */
.map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.error-content {
    text-align: center;
    padding: 60px 40px;
    max-width: 500px;
}

.error-content i {
    font-size: 80px;
    color: #ef4444;
    margin-bottom: 24px;
    display: block;
}

.error-content h4 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
}

.error-content p {
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
    font-size: 16px;
}

/* Harita kontrolleri */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.map-controls .btn {
    padding: 10px 16px;
    font-size: 13px;
    min-width: auto;
    min-height: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.map-controls .btn:hover {
    background: white;
    transform: translateY(-1px);
}

.map-controls .btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Harita bilgi kartı */
.map-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

.current-address {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.current-address i {
    margin-right: 12px;
    color: #ef4444;
    font-size: 16px;
}

/* Modal düzenlemeleri */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 24px 30px;
}

.modal-title {
    font-weight: 700;
    font-size: 20px;
}

.btn-close {
    filter: invert(1);
    font-size: 16px;
}

.modal-body {
    padding: 30px;
}

/* Özet kartları modal içinde */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.summary-card {
    background: #f8faff;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.summary-card i {
    font-size: 28px;
    margin-bottom: 12px;
    color: #667eea;
}

.summary-card h6 {
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-card span {
    color: #1e293b;
    font-weight: 700;
    font-size: 18px;
}

/* Toast konteyner */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1060;
    max-width: 400px;
}

.toast {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    overflow: hidden;
}

.toast-body {
    padding: 16px 20px;
    font-weight: 500;
}

/* Responsive tasarım */
@media (max-width: 1200px) {
    .solar-panel-sidebar {
        width: 360px;
        min-width: 360px;
        padding: 20px;
    }
    
    .measurement-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 1024px) {
    .solar-panel-sidebar {
        width: 320px;
        min-width: 320px;
    }
    
    .panel-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .panel-section h4 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    #solar-panel-calculator {
        height: auto;
        min-height: 600px;
        border-radius: 16px;
        margin: 15px 0;
        padding: 3px;
    }
    
    .solar-panel-container {
        flex-direction: column;
        height: auto;
    }
    
    .solar-panel-sidebar {
        width: 100%;
        min-width: auto;
        max-height: none;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding: 20px;
        order: 2;
    }
    
    .solar-panel-map {
        min-height: 400px;
        order: 1;
    }
    
    #solar-map {
        border-radius: 13px 13px 0 0;
    }
    
    .map-controls {
        top: 15px;
        right: 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .map-controls .btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .current-address {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .panel-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .measurement-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .measurement-card {
        padding: 16px;
    }
    
    .measurement-card .icon {
        font-size: 28px;
    }
    
    .measurement-card .value {
        font-size: 20px;
    }
    
    .price-card {
        padding: 20px;
    }
    
    .price-value {
        font-size: 26px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .step-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #solar-panel-calculator {
        margin: 10px 0;
        border-radius: 12px;
    }
    
    .solar-panel-sidebar {
        padding: 15px;
    }
    
    .panel-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .panel-section h4 {
        font-size: 15px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .panel-section h4 i {
        margin-right: 0;
        margin-bottom: 8px;
        align-self: flex-start;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
    }
    
    .measurement-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .measurement-card {
        padding: 12px;
    }
    
    .measurement-card .icon {
        font-size: 24px;
    }
    
    .measurement-card .value {
        font-size: 18px;
    }
    
    .price-value {
        font-size: 22px;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .step-text {
        font-size: 13px;
    }
    
    #toast-container {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.pulse {
    animation: pulse 2s infinite;
}

.shake {
    animation: shake 0.6s ease-in-out;
}

.panel-section {
    animation: fadeInUp 0.6s ease-out;
}

.panel-section:nth-child(1) { animation-delay: 0.1s; }
.panel-section:nth-child(2) { animation-delay: 0.2s; }
.panel-section:nth-child(3) { animation-delay: 0.3s; }
.panel-section:nth-child(4) { animation-delay: 0.4s; }

/* Loading durumu */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Custom scrollbar */
.solar-panel-sidebar::-webkit-scrollbar {
    width: 8px;
}

.solar-panel-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.solar-panel-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.solar-panel-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
    .solar-panel-sidebar {
        background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
        color: #f1f5f9;
    }
    
    .panel-section {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .form-control {
        background: #1e293b;
        border-color: #475569;
        color: #f1f5f9;
    }
    
    .form-control::placeholder {
        color: #64748b;
    }
    
    .current-address {
        background: rgba(30, 41, 59, 0.95);
        color: #f1f5f9;
    }
    
    .measurement-card {
        background: #334155;
        border-color: #475569;
    }
    
    .measurement-card .value {
        color: #f1f5f9;
    }
}

/* Print styles */
@media print {
    .solar-panel-sidebar {
        width: 100%;
        background: white;
    }
    
    .solar-panel-map {
        display: none;
    }
    
    .btn,
    .map-controls,
    .action-buttons {
        display: none;
    }
}