/**
 * Harmony Calculator Tools - Styles
 * Modern ve responsive hesaplama araçları için stil dosyası
 */

/* ========== Genel Wrapper ========== */
.hct-calculator-wrapper {
    margin: 30px auto;
    max-width: 650px;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* ========== 2 Kolonlu Layout (Desktop) ========== */
/* Sayfa wrapper - manuel kullanım için */
.hct-page-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    align-items: flex-start;
}

/* Sol kolon - İçerik */
.hct-content-column {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Sağ kolon - Hesaplama aracı */
.hct-sidebar-column {
    flex: 0 0 450px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Sağ kolonda hesaplama aracı wrapper'ı sıfırla */
.hct-sidebar-column .hct-calculator-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Otomatik 2 kolon yapısı - WordPress içerik bölgeleri için */
@media (min-width: 1024px) {
    /* WordPress entry-content içinde otomatik layout */
    body.hct-auto-layout .entry-content,
    body.hct-auto-layout .post-content,
    body.hct-auto-layout .page-content,
    body.hct-auto-layout article .entry-content {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        align-items: flex-start;
    }
    
    /* İçerik wrapper'ı oluştur */
    body.hct-auto-layout .entry-content::before,
    body.hct-auto-layout .post-content::before,
    body.hct-auto-layout .page-content::before {
        content: '';
        display: none;
    }
    
    /* İçerik alanını wrapper'a al */
    body.hct-auto-layout .entry-content > *:not(.hct-calculator-wrapper),
    body.hct-auto-layout .post-content > *:not(.hct-calculator-wrapper),
    body.hct-auto-layout .page-content > *:not(.hct-calculator-wrapper) {
        flex: 1 1 auto;
        width: calc(100% - 490px);
        min-width: 300px;
        max-width: 100%;
        order: 1;
    }
    
    /* Hesaplama aracını sağa al */
    body.hct-auto-layout .hct-calculator-wrapper {
        flex: 0 0 450px;
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        margin: 0;
        padding: 0;
        order: 2; /* Her zaman sağda */
    }
}

.hct-calculator {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.hct-calculator:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ========== Header ========== */
.hct-calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    color: #ffffff;
    text-align: center;
}

.hct-calculator-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.hct-calculator-desc {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

/* ========== Body ========== */
.hct-calculator-body {
    padding: 20px;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .hct-calculator-body {
        padding: 20px 15px;
    }
}

/* ========== Form Section ========== */
.hct-form-section {
    margin-bottom: 18px;
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hct-form-group {
    margin-bottom: 14px;
}

.hct-form-group:last-child {
    margin-bottom: 0;
}

.hct-form-group small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #6c757d;
}

.hct-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
}

.hct-form-group label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    height: auto;
}

.hct-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2d3748;
    box-sizing: border-box;
    font-family: inherit;
}

.hct-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hct-input::placeholder {
    color: #a0aec0;
}

/* Dropdown/Select özel stilleri */
.hct-input option {
    padding: 8px;
    color: #2d3748;
    background: #ffffff;
    font-size: 14px;
}

/* ========== Button ========== */
.hct-button {
    display: inline-block;
    padding: 13px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.hct-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    width: 100%;
    margin-top: 5px;
}

.hct-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.hct-button-primary:active {
    transform: translateY(0);
}

/* ========== Results Section ========== */
.hct-results-section {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    margin-top: 18px;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.hct-results-section h4 {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 3px solid #667eea;
    padding-bottom: 9px;
}

/* ========== Result Table ========== */
.hct-result-table {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #e9ecef;
}

.hct-result-table table {
    width: 100%;
    border-collapse: collapse;
}

.hct-result-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.hct-result-table tbody tr:last-child {
    border-bottom: none;
}

.hct-result-table tbody tr:hover {
    background-color: #f1f3f5;
}

.hct-result-table td {
    padding: 13px 18px;
    font-size: 14px;
    color: #495057;
}

.hct-result-table td:first-child {
    color: #495057;
    font-weight: 500;
}

.hct-result-table td strong {
    font-weight: 600;
    color: #212529;
}

.hct-result-table .text-right {
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #212529;
}

.hct-result-table .text-negative {
    color: #dc3545;
}

.hct-result-table .text-positive {
    color: #28a745;
}

.hct-result-table .divider td {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
    padding: 10px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hct-result-table .result-highlight {
    background: #e7f1ff;
    font-size: 15px;
}

.hct-result-table .result-success {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.hct-result-table .result-success td {
    color: #667eea;
    font-size: 16px;
}

/* ========== Info Box ========== */
.hct-info-box {
    background: #fff8e1;
    border-left: 4px solid #ffa726;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
}

.hct-info-box p {
    margin: 0;
    color: #5d4037;
    font-size: 13px;
    line-height: 1.5;
}

.hct-info-box strong {
    color: #e65100;
    font-weight: 600;
}

/* ========== Responsive Design ========== */
/* Tablet ve mobilde tek kolon */
@media (max-width: 1023px) {
    .hct-page-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .hct-sidebar-column {
        flex: 1;
        position: static;
        max-height: none;
        width: 100%;
    }
    
    .hct-sidebar-column .hct-calculator-wrapper {
        max-width: 650px;
        margin: 0 auto;
    }
    
    /* Otomatik layout'u kapat */
    body.hct-auto-layout .entry-content,
    body.hct-auto-layout .post-content,
    body.hct-auto-layout .page-content {
        display: block;
    }
    
    body.hct-auto-layout .hct-calculator-wrapper {
        position: static;
        max-height: none;
        max-width: 650px;
        margin: 20px auto;
        order: initial;
    }
}

@media (max-width: 768px) {
    .hct-calculator-wrapper {
        max-width: 100%;
        margin: 15px auto;
        padding: 0 10px;
    }
    
    .hct-calculator-title {
        font-size: 19px;
    }
    
    .hct-calculator-desc {
        font-size: 13px;
    }
    
    .hct-calculator-header {
        padding: 18px 18px;
    }
    
    .hct-form-section {
        padding: 18px;
    }
    
    .hct-results-section {
        padding: 18px;
    }
    
    .hct-result-table td {
        padding: 11px 14px;
        font-size: 13px;
    }
    
    .hct-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hct-calculator-wrapper {
        margin: 10px auto;
        padding: 0 8px;
    }
    
    .hct-calculator-header {
        padding: 16px 15px;
    }
    
    .hct-calculator-title {
        font-size: 17px;
    }
    
    .hct-calculator-desc {
        font-size: 12px;
    }
    
    .hct-form-section {
        padding: 16px;
    }
    
    .hct-results-section {
        padding: 16px;
    }
    
    .hct-result-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .hct-result-table td:first-child {
        font-size: 12px;
    }
    
    .hct-button {
        font-size: 14px;
    }
}

/* ========== Dark Mode Support (Optional) ========== */
@media (prefers-color-scheme: dark) {
    .hct-calculator {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .hct-calculator-body {
        background: #1a202c;
    }
    
    .hct-form-group label {
        color: #e2e8f0;
    }
    
    .hct-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .hct-results-section {
        background: #2d3748;
    }
    
    .hct-result-table {
        background: #1a202c;
    }
    
    .hct-result-table td {
        color: #cbd5e0;
    }
    
    .hct-result-table tbody tr {
        border-bottom-color: #4a5568;
    }
    
    .hct-info-box {
        background: #2d3748;
        border-left-color: #ffa726;
    }
    
    .hct-info-box p {
        color: #cbd5e0;
    }
}

/* ========== Print Styles ========== */
@media print {
    .hct-form-section {
        display: none;
    }
    
    .hct-calculator {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .hct-results-section {
        background: #ffffff !important;
    }
}

/* ========== Accessibility ========== */
.hct-calculator *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.hct-calculator button:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* ========== Loading Animation ========== */
.hct-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

