﻿/* ============================================ */
/* ALAN HESAPLAMA - Ã–zel Stil DosyasÄ± */
/* ============================================ */

/* ============================================ */
/* CSS DEÄÄ°ÅKENLERÄ° */
/* ============================================ */
:root {
    /* Renkler */
    --alan-primary: #16A34A;
    --alan-primary-light: #22C55E;
    --alan-primary-dark: #15803D;
    --alan-bg: #F0FDF4;
    --alan-card-bg: #FFFFFF;
    --alan-text-primary: #052E16;
    --alan-text-secondary: #166534;
    --alan-success: #16A34A;
    --alan-error: #DC2626;
    --alan-warning: #16A34A;
    --alan-sidebar-bg: #FFFFFF;
    
    /* Tipografi */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'Roboto Mono', 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transition */
    --transition-base: 0.3s ease;
    
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* ============================================ */
/* BREADCRUMB */
/* ============================================ */
.breadcrumb-nav {
    background-color: var(--background);
    border-bottom: 1px solid rgba(22, 163, 74, 0.1);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-secondary);
    padding: 0 0.5rem;
}

/* ============================================ */
/* ALAN BÖLÜMÜ */
/* ============================================ */
.alan-section {
    background-color: var(--background);
    min-height: calc(100vh - 300px);
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.alan-section .row {
    align-items: flex-start;
}

/* Başlık Container */
.alan-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* İkon */
.alan-icon {
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

/* Başlık */
.alan-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

/* Alt başlık */
.alan-subtitle {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================ */
/* HESAPLAMA KARTI */
/* ============================================ */
.calculator-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--background) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(22, 163, 74, 0.12);
    position: relative;
    overflow: hidden;
}

/* Calculator Card Responsive */
@media (max-width: 991.98px) {
    .calculator-card {
        padding: 2rem;
        border-radius: 16px;
    }
}

@media (max-width: 767.98px) {
    .calculator-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
}

@media (max-width: 575.98px) {
    .calculator-card {
        padding: 1.25rem;
        border-radius: 10px;
    }
}

/* Calculator Card Responsive */
@media (max-width: 991.98px) {
    .calculator-card {
        padding: 2rem;
        border-radius: 16px;
    }
}

@media (max-width: 767.98px) {
    .calculator-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
}

@media (max-width: 575.98px) {
    .calculator-card {
        padding: 1.25rem;
        border-radius: 10px;
    }
}

/* FaktÃ¶riyel sayfasÄ±ndaki gibi geniÅŸlik ayarÄ± */
@media (min-width: 992px) {
    .content-main .calculator-card {
        width: 100%;
        max-width: 100%;
    }
}

/* Calculator Layout - İki Sütunlu Düzen */
.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    width: 100%;
    align-items: start;
}

.calculator-controls {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.calculator-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: sticky;
    top: 2rem;
    padding: 2rem;
    min-height: 350px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 50%, #FFFFFF 100%);
    border-radius: 16px;
    border: 2px solid rgba(22, 163, 74, 0.12);
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.08), 0 2px 8px rgba(22, 163, 74, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.calculator-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(22, 163, 74, 0.03) 0%, transparent 70%);
    pointer-events: none;
}


/* Calculator Layout Responsive */
@media (max-width: 991.98px) {
    .calculator-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-visual {
        position: static;
        order: -1;
        min-height: 280px;
        margin-bottom: 1.5rem;
        padding: 1.75rem;
        border-radius: 14px;
    }
    
    .shape-image-form {
        max-height: 240px;
    }
}

@media (max-width: 767.98px) {
    .calculator-layout {
        gap: 1.5rem;
    }
    
    .calculator-visual {
        min-height: 220px;
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .shape-image-form {
        max-height: 180px;
    }
}


/* ============================================ */
/* YENÄ° TASARIM - GiriÅŸ AlanlarÄ± */
/* ============================================ */

:root {
    --green: #16A34A;
    --green-light: #EAF7EF;
    --border: #CCEAD7;
    --text: #1F2937;
}

/* Input Group Container */
.input-group {
    margin-bottom: 1.5rem;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.input-group:has(.unit-select[data-open="true"]) {
    z-index: 100;
}

/* Label - Üstte, Icon ile */
.input-label {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
}

.input-label i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Input Wrapper - Relative Container */
.input-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
}

/* Input Field */
.input-wrapper input,
.input-field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100%;
    padding: 1.125rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    border: 2px solid rgba(22, 163, 74, 0.15);
    border-radius: 0 14px 14px 0 !important;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFFFC 100%);
    color: var(--text-primary);
    appearance: textfield;
    -moz-appearance: textfield;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.05);
    box-sizing: border-box;
    display: block;
    outline: none;
}

/* Bootstrap form-control override */
.input-group .form-control.input-field {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100%;
    border-radius: 0 14px 14px 0 !important;
}

.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button,
.input-field::-webkit-outer-spin-button,
.input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-wrapper input:focus,
.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12), 0 4px 12px rgba(22, 163, 74, 0.15);
    background: #FFFFFF;
    transform: translateY(-1px);
}

.input-wrapper input::placeholder,
.input-field::placeholder {
    color: #9CA3AF;
    opacity: 0.7;
}

/* Select Dropdown */
.input-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2316A34A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 12px 12px;
    padding-right: 2.5rem;
}

/* Select için özel stil */
.input-field select,
.input-select {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

.input-hint {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    background: rgba(22, 163, 74, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    width: 100%;
    box-sizing: border-box;
}

.input-hint i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Buton Grubu - Input Hint'ten Sonra */
.d-flex.gap-3.mb-4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.d-flex.gap-3.mb-4 .btn-calculate,
.d-flex.gap-3.mb-4 .btn-clear {
    flex: 1 1 auto;
    min-width: 0;
}

/* ============================================ */
/* Unit Selector - Input Ä°Ã§inde */
/* ============================================ */

.unit-selector-wrapper {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 10;
}

.unit-select {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 10;
}

.unit-select[data-open="true"] {
    z-index: 101;
}

.unit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 36px;
    padding: 0 14px;
    min-width: 65px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    user-select: none;
    justify-content: center;
}

.unit-btn:hover {
    background: var(--green-light);
    border-color: var(--green);
}

.unit-btn .arrow {
    font-size: 0.875rem;
    transition: transform 0.25s ease;
    color: var(--green);
}

.unit-select[data-open="true"] .arrow {
    transform: rotate(180deg);
}

.unit-text {
    font-weight: 600;
}

/* ============================================ */
/* Unit Dropdown - Yeni TasarÄ±m */
/* ============================================ */

.unit-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    list-style: none;
    padding: 6px;
    margin: 0;
    display: none;
    z-index: 102;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
}

.unit-select[data-open="true"] .unit-dropdown {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unit-dropdown li {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.15s ease;
}

.unit-dropdown li:hover {
    background: var(--green-light);
    color: var(--green);
}


/* Shape Visualization Styles */
.shape-visualization svg {
    max-width: 100%;
    max-height: 100%;
}

.shape-visualization .shape-fill {
    fill: var(--alan-primary);
    stroke: #000000;
    stroke-width: 2;
}

.shape-visualization .dimension-line {
    stroke: #000000;
    stroke-width: 1.5;
    marker-end: url(#arrowhead);
    marker-start: url(#arrowhead);
}

.shape-visualization .dimension-label {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    fill: #000000;
}

.shape-visualization .dimension-text {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    fill: #666666;
}

/* Hesapla Butonu */
.btn-calculate {
    padding: 1.125rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
    margin-top: 0;
}

.btn-calculate::after {
    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;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateX(3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4), 0 0 15px rgba(22, 163, 74, 0.2);
}

.btn-calculate:hover::after {
    left: 100%;
}

.btn-calculate:active {
    transform: translateX(1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.btn-calculate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Temizle Butonu */
.btn-clear {
    padding: 1.125rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    margin-top: 0;
}

.btn-clear::after {
    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;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
    transform: translateX(3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4), 0 0 15px rgba(220, 38, 38, 0.2);
}

.btn-clear:hover::after {
    left: 100%;
}

.btn-clear:active {
    transform: translateX(1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-clear:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================ */
/* SONUÃ‡ ALANI - YENÄ° TASARIM */
/* ============================================ */
.result-container {
    margin-top: var(--spacing-lg);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--alan-success);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
}

.result-header i {
    color: var(--alan-success);
    font-size: 1.25rem;
}

/* SonuÃ§ BÃ¶lÃ¼mleri */
.result-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
    border-radius: 12px;
    border: 1px solid rgba(22, 163, 74, 0.1);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.05);
}

.result-section:last-child {
    margin-bottom: 0;
}

/* SonuÃ§ Ä°ÅŸlem ButonlarÄ± */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(22, 163, 74, 0.1);
}

.result-action-btn {
    padding: 0.75rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--background) 100%);
    color: var(--text-primary);
    border: 2px solid rgba(22, 163, 74, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.08);
    flex: 1 1 auto;
    min-width: 140px;
}

.result-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.2);
}

.result-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.15);
}

.result-action-btn i {
    font-size: 0.95rem;
}

.result-action-btn span {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .result-actions {
        flex-direction: column;
    }
    
    .result-action-btn {
        width: 100%;
        min-width: unset;
    }
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(22, 163, 74, 0.1);
}

.section-label i {
    color: var(--alan-primary);
    font-size: 1.1rem;
}

.section-label span {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FormÃ¼l BÃ¶lÃ¼mÃ¼ */
.formula-section {
    background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
}

.result-formula {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--alan-text-primary);
    line-height: 1.8;
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    padding: 0.5rem 0;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-formula::-webkit-scrollbar {
    height: 4px;
}

.result-formula::-webkit-scrollbar-track {
    background: rgba(22, 163, 74, 0.05);
    border-radius: 2px;
}

.result-formula::-webkit-scrollbar-thumb {
    background: var(--alan-primary);
    border-radius: 2px;
}

/* SonuÃ§ DeÄŸeri BÃ¶lÃ¼mÃ¼ */
.value-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
    border: 2px solid rgba(22, 163, 74, 0.15);
}

.result-value {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--alan-primary);
    line-height: 1.5;
    word-break: break-word;
    display: block;
    text-align: center;
    padding: 1rem;
    background: rgba(22, 163, 74, 0.03);
    border-radius: 8px;
}

.result-value sup {
    font-size: 0.55em;
    vertical-align: super;
    font-weight: 600;
    margin-left: 0.08em;
    line-height: 0;
    color: var(--alan-text-secondary);
    position: relative;
    top: -0.2em;
}

.result-value .unit-label {
    margin-left: 0.15rem;
    color: var(--alan-text-secondary);
    font-size: 0.65em;
    font-weight: 500;
    vertical-align: baseline;
    display: inline-block;
    line-height: 1;
}

.result-value .unit-sup {
    font-size: 0.55em;
    margin-left: 0.05em;
    color: var(--alan-text-secondary);
    font-weight: 600;
    vertical-align: super;
    position: relative;
    top: -0.2em;
    line-height: 0;
}

/* Detay Bilgileri BÃ¶lÃ¼mÃ¼ */
.details-section {
    background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 1rem;
    background: #FFFFFF;
    border-radius: 8px;
    border-left: 4px solid var(--alan-primary);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.08);
    transition: all 0.3s ease;
}

/* Hover efekti kaldÄ±rÄ±ldÄ± */

.detail-item {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--alan-text-secondary);
    line-height: 1.6;
}

.detail-item strong {
    display: block;
    font-weight: 600;
    color: var(--alan-text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span:not(strong) {
    display: block;
    font-weight: 700;
    color: var(--alan-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-top: 0.25rem;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

.detail-item sup {
    font-size: 0.65em;
    vertical-align: super;
    font-weight: 600;
    position: relative;
    top: -0.15em;
    margin-left: 0.05em;
    line-height: 0;
    color: var(--alan-text-secondary);
}

.detail-item div {
    font-weight: 700;
    color: var(--alan-primary);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    margin-top: 0.25rem;
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Hesaplama AdÄ±mlarÄ± Stilleri */
.detail-item div .step-item {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-family: var(--font-mono);
    display: block;
}

.detail-item div .step-item:last-child {
    margin-bottom: 0;
}

.detail-item div .step-intermediate {
    color: var(--alan-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.detail-item div .step-final {
    color: var(--alan-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(22, 163, 74, 0.15);
    display: inline-block;
    width: 100%;
}

.detail-item div sup {
    font-size: 0.6em;
    vertical-align: super;
    font-weight: 600;
    position: relative;
    top: -0.15em;
    margin-left: 0.05em;
    line-height: 0;
    color: var(--alan-text-secondary);
}

.detail-item div .unit-label {
    color: var(--alan-text-secondary);
    font-size: 0.7em;
    margin-left: 0.15rem;
    font-weight: 500;
    vertical-align: baseline;
    display: inline-block;
}

.detail-item div .unit-sup {
    font-size: 0.55em;
    margin-left: 0.05em;
    color: var(--alan-text-secondary);
    font-weight: 600;
    vertical-align: super;
    position: relative;
    top: -0.15em;
    line-height: 0;
    display: inline-block;
}

/* Eski stiller kaldÄ±rÄ±ldÄ± - faktÃ¶riyel temasÄ± kullanÄ±lÄ±yor */

/* ============================================ */
/* ÅEKÄ°L GÃ–RSELÄ° */
/* ============================================ */

/* Form AlanÄ±nda Åekil GÃ¶rseli - SaÄŸ Taraf */
.shape-image-form {
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Hover efekti kaldÄ±rÄ±ldÄ± */

/* SonuÃ§ AlanÄ±nda Åekil GÃ¶rseli */
.shape-image-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
    text-align: center;
}

.shape-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    min-height: 150px;
}

.shape-image {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(22, 163, 74, 0.15));
    transition: transform 0.3s ease;
}

.shape-image:hover {
    transform: scale(1.05);
}

/* ============================================ */
/* HATA MESAJI */
/* ============================================ */
.error-container {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: rgba(22, 163, 74, 0.1);
    border-radius: 12px;
    color: var(--alan-error);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    animation: fadeInUp 0.5s ease;
}

/* ============================================ */
/* RESPONSIVE TASARIM */
/* ============================================ */

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .alan-header {
        gap: 1rem;
    }
    
    .alan-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.75rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .alan-section {
        padding-top: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }
    
    .alan-title {
        font-size: 2rem;
    }
    
    .alan-subtitle {
        font-size: 1rem;
    }
    
    .calculator-card {
        padding: var(--spacing-lg);
    }
    
    .calculator-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-visual {
        position: static;
        order: -1;
        padding: 1.25rem;
        min-height: 250px;
    }
    
    .shape-image-form {
        max-height: 220px;
    }
    
    .alan-header {
        gap: 0.875rem;
    }
    
    .alan-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .sidebar {
        position: static;
        margin-top: var(--spacing-lg);
    }
    
    .sidebar-card {
        margin-bottom: var(--spacing-md);
    }
    
    .result-formula {
        font-size: 1.05rem;
        line-height: 1.75;
    }
    
    .result-section {
        padding: 1.125rem;
    }
    
    .section-label {
        font-size: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    .alan-section {
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
    }
    
    .alan-title {
        font-size: 1.75rem;
    }
    
    .alan-subtitle {
        font-size: 0.95rem;
    }
    
    .calculator-card {
        padding: var(--spacing-md);
    }
    
    .calculator-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-visual {
        position: static;
        order: -1;
        padding: 1.25rem;
        min-height: 220px;
        border-radius: 12px;
    }
    
    .shape-image-form {
        max-height: 180px;
    }
    
    .input-field {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .alan-header {
        gap: 0.75rem;
    }
    
    .alan-icon {
        width: 50px;
        height: 50px;
        font-size: 1.375rem;
    }
    
    .result-value {
        font-size: 2rem;
        padding: 1rem;
    }
    
    .result-container {
        margin-top: var(--spacing-md);
    }
    
    .result-header {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .result-section {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .section-label {
        font-size: 0.9rem;
        margin-bottom: 0.875rem;
        padding-bottom: 0.625rem;
    }
    
    .section-label i {
        font-size: 1rem;
    }
    
    .section-label span {
        font-size: 0.9rem;
    }
    
    .result-formula {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .result-value {
        font-size: 1.75rem;
        padding: 0.875rem;
    }
    
    .result-details {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .detail-item {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
    
    .detail-item strong {
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }
    
    .detail-item span:not(strong),
    .detail-item div {
        font-size: 1rem;
        margin-top: 0.25rem;
    }
    
    .btn-calculate {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .sidebar {
        margin-top: var(--spacing-md);
    }
    
    .sidebar-card {
        padding: var(--spacing-md);
    }
    
    .sidebar-title {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
        margin-left: calc(var(--spacing-md) * -1);
        margin-right: calc(var(--spacing-md) * -1);
        margin-top: calc(var(--spacing-md) * -1);
    }
    
    .sidebar-link {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .alan-section {
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
    }
    
    .alan-title {
        font-size: 1.5rem;
    }
    
    .alan-subtitle {
        font-size: 0.9rem;
    }
    
    .calculator-card {
        padding: var(--spacing-sm);
    }
    
    .alan-header {
        gap: 0.625rem;
        flex-direction: row;
        align-items: center;
    }
    
    .alan-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
        border-radius: 10px;
    }
    
    .result-value {
        font-size: 1.75rem;
        padding: 0.875rem;
    }
    
    .result-container {
        padding: 1.25rem;
    }
    
    .result-header {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .result-header i {
        font-size: 1.1rem;
    }
    
    .result-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .section-label {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .section-label i {
        font-size: 0.95rem;
    }
    
    .section-label span {
        font-size: 0.85rem;
    }
    
    .result-formula {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .result-value {
        font-size: 1.5rem;
        padding: 0.75rem;
    }
    
    .result-value .unit-label {
        font-size: 0.6em;
        margin-left: 0.25rem;
    }
    
    .result-value .unit-sup,
    .result-value sup {
        font-size: 0.5em;
        top: -0.15em;
    }
    
    .result-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .detail-item {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .detail-item strong {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .detail-item span:not(strong),
    .detail-item div {
        font-size: 0.95rem;
        margin-top: 0.25rem;
    }
    
    .shape-image-form-container {
        min-height: 150px;
        padding: 1.25rem;
    }
    
    .shape-image-form {
        max-height: 120px;
    }
    
    .shape-image-wrapper {
        min-height: 120px;
    }
    
    .shape-image {
        max-height: 150px;
    }
    
    .input-field {
        font-size: 0.95rem;
        padding: 0.75rem 0.875rem;
    }
    
    .btn-calculate {
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
    }
    
    .input-label {
        font-size: 0.9rem;
    }
    
    .input-hint {
        font-size: 0.85rem;
    }
    
    .result-formula {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .sidebar-card {
        padding: var(--spacing-sm);
    }
    
    .sidebar-title {
        font-size: 0.95rem;
        padding: var(--spacing-sm);
        margin-left: calc(var(--spacing-sm) * -1);
        margin-right: calc(var(--spacing-sm) * -1);
        margin-top: calc(var(--spacing-sm) * -1);
    }
    
    .sidebar-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .tip-text {
        font-size: 0.8rem;
    }
}

/* ============================================ */
/* SIDEBAR */
/* ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
    margin-top: 0;
    align-self: flex-start;
}

/* Sidebar'Ä± hesaplama formuyla aynÄ± hizaya getir */
@media (min-width: 992px) {
    /* Calculator-card'Ä±n Ã¼st kÄ±smÄ± ile sidebar'Ä±n ilk card'Ä±nÄ±n Ã¼st kÄ±smÄ± aynÄ± hizada */
    .sidebar {
        margin-top: 0;
        padding-top: 0;
    }
    
    .sidebar .sidebar-card:first-child {
        padding-top: 0;
        border-radius: 16px;
    }
    
    .sidebar .sidebar-card:first-child .sidebar-title {
        margin-top: 0;
        border-radius: 16px 16px 0 0;
    }
}

.sidebar-card {
    background-color: var(--alan-sidebar-bg);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(22, 163, 74, 0.1);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    margin-bottom: var(--spacing-md);
    margin-left: calc(var(--spacing-lg) * -1);
    margin-right: calc(var(--spacing-lg) * -1);
    margin-top: calc(var(--spacing-lg) * -1);
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.2);
}

.sidebar-title i {
    color: #FFFFFF;
}

/* Sidebar Linkler */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    gap: 0.5rem;
}

.sidebar-link:hover {
    background-color: rgba(22, 163, 74, 0.05);
    color: var(--primary);
    transform: translateX(4px);
}

.sidebar-link.active {
    background-color: rgba(22, 163, 74, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* PopÃ¼ler Badge */
.badge-popular {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

/* KullanÄ±m Ä°puÃ§larÄ± */
.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    width: 100%;
}

.tip-icon {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.tip-text {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.tip-icon {
    color: var(--alan-primary);
    font-size: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.tip-text {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--alan-text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ============================================ */
/* RESPONSIVE - SIDEBAR */
/* ============================================ */

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        margin-top: var(--spacing-lg);
    }
    
    .sidebar-card {
        margin-bottom: var(--spacing-md);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    .sidebar {
        margin-top: var(--spacing-md);
    }
    
    .sidebar-card {
        padding: var(--spacing-md);
    }
    
    .sidebar-title {
        font-size: 1rem;
    }
    
    .sidebar-link {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem;
    }
}

