/* Calculator Specific Styles */

.hero-small {
    padding: 2rem 0;
}

.calculator-container {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.calc-section {
    margin-bottom: 3rem;
}

.calc-section .section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.calc-section .section-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.calc-section .section-header h2 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.calc-section .section-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.calc-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.calc-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
}

.calc-input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-input-group label i {
    color: var(--primary-color);
}

.info-icon {
    cursor: help;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: auto;
}

.calc-input-group input,
.calc-input-group select {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.calc-input-group input:focus,
.calc-input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Input Method Sections */
.input-method-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.input-method-section:first-of-type {
    border-top: none;
}

.calc-result-box {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.result-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.result-label {
    font-weight: 600;
    color: var(--text-dark);
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Storage Table */
.storage-table {
    overflow-x: auto;
    margin-bottom: 2rem;
}

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

.storage-table th,
.storage-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.storage-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.storage-table tbody tr:hover {
    background: var(--light-bg);
}

.storage-table .total-row {
    background: var(--light-bg);
    font-weight: bold;
}

.storage-table td i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Architecture Diagram */
.architecture-diagram {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.arch-layer {
    margin: 2rem 0;
    text-align: center;
}

.arch-layer h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arch-components {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.arch-component {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.arch-component:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.arch-component i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.arch-component.data-source {
    border-left: 4px solid #3498db;
}

.arch-component.data-source i {
    color: #3498db;
}

.arch-component.forwarder {
    border-left: 4px solid #9b59b6;
}

.arch-component.forwarder i {
    color: #9b59b6;
}

.arch-component.indexer {
    border-left: 4px solid #e74c3c;
}

.arch-component.indexer i {
    color: #e74c3c;
}

.arch-component.search-head {
    border-left: 4px solid #f39c12;
}

.arch-component.search-head i {
    color: #f39c12;
}

.arch-component.user {
    border-left: 4px solid #27ae60;
}

.arch-component.user i {
    color: #27ae60;
}

.arch-component span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

.arch-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    position: relative;
}

.arrow-line {
    width: 3px;
    height: 40px;
    background: var(--primary-color);
    position: relative;
}

.arrow-line::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--primary-color);
}

.flow-label {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.arch-storage-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.storage-tier {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-direction: column;
}

.storage-tier.ssd {
    border-left: 4px solid #e74c3c;
}

.storage-tier.ssd i {
    color: #e74c3c;
}

.storage-tier.hdd {
    border-left: 4px solid #3498db;
}

.storage-tier.hdd i {
    color: #3498db;
}

.storage-tier.archive {
    border-left: 4px solid #95a5a6;
}

.storage-tier.archive i {
    color: #95a5a6;
}

.storage-tier i {
    font-size: 1.5rem;
}

.storage-tier span {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

.storage-tier strong {
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Architecture Stats */
.arch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--primary-color);
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-item div {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Animations - Disabled */
.animate-pulse,
.animate-slide,
.animate-glow,
.animate-bounce {
    /* Animations removed */
}

/* Disk Size Calculation */
.disk-summary {
    margin-top: 2rem;
}

.disk-summary h3,
.disk-summary h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.disk-summary h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.result-item.highlight {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.result-item.highlight .result-label,
.result-item.highlight .result-value {
    color: white !important;
    font-size: 1.1rem;
}

.deployment-note {
    margin: 2rem 0;
}

.info-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-box i {
    color: #4caf50;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box strong {
    color: #2e7d32;
    display: block;
    margin-bottom: 0.5rem;
}

.info-box p {
    color: #388e3c;
    margin: 0;
    line-height: 1.6;
}

.storage-breakdown {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.storage-breakdown h4 {
    margin-bottom: 1rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.breakdown-item {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.breakdown-item.total {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.breakdown-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.breakdown-value {
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Configuration Tabs */
.config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.tab-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.copy-btn {
    margin-top: 1rem;
}

/* Action Buttons */
.calc-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 3rem 0;
}

.calc-actions .btn {
    min-width: 200px;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    .calc-section {
        margin-bottom: 2rem;
    }

    .calc-section .section-header h2 {
        font-size: 1.5rem;
    }

    .calc-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calc-card {
        padding: 1rem;
    }

    .storage-table {
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }

    .storage-table table {
        min-width: 600px;
    }

    .storage-table th,
    .storage-table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    .calc-actions {
        flex-direction: column;
        margin: 2rem 0;
    }

    .calc-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .calc-result-box {
        padding: 1rem;
    }

    .architecture-diagram {
        padding: 1rem;
    }

    .arch-components {
        gap: 1rem;
    }

    .arch-component {
        min-width: 100px;
        padding: 1rem;
    }

    .arch-component i {
        font-size: 1.5rem;
    }

    .arch-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .config-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem 1rem;
    }

    .tab-content pre {
        font-size: 0.8rem;
        padding: 1rem;
        max-height: 400px;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calc-section .section-header h2 {
        font-size: 1.25rem;
    }

    .storage-table table {
        min-width: 500px;
        font-size: 0.75rem;
    }

    .arch-stats {
        grid-template-columns: 1fr;
    }

    .arch-component {
        min-width: 80px;
        padding: 0.75rem;
    }

    .arch-component span {
        font-size: 0.8rem;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-section {
    animation: slideIn 0.5s ease-out;
}

/* Loading State */
.calculating {
    opacity: 0.6;
    pointer-events: none;
}

.calculating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

