/* =========================================
   SUBNET CALCULATOR SPECIFIC STYLES
   ========================================= */

.featured-calculator {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* PROTOCOL TOGGLE */
.protocol-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    position: relative;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
}

.toggle-btn.active {
    color: var(--primary);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: white;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.protocol-toggle[data-active="ipv6"] .toggle-slider {
    transform: translateX(100%);
}

.input-wrapper label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.input-wrapper input {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.calc-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.2s;
}

.calc-action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* RESULTS SECTION */
.result-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
}

.result-value.highlight {
    color: var(--primary);
    font-size: 1.4rem;
}

/* NETWORK CLASS SELECTION */
.class-selection-container {
    margin-bottom: 20px;
}

.section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.class-options {
    display: flex;
    gap: 12px;
}

.class-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.class-option:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}

.class-option.active {
    background: rgba(30, 64, 175, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.class-check {
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: transparent;
    transition: all 0.2s ease;
}

.class-option.active .class-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.class-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
}

.class-option.active .class-name {
    color: var(--primary);
}

/* TABLE STYLES */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0 40px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.subnet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.subnet-table th {
    background: #f8fafc;
    padding: 16px;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid #e2e8f0;
}

.subnet-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-muted);
}

.subnet-table tbody tr:hover {
    background: #f1f5f9;
}

.subnet-table tbody tr:last-child td {
    border-bottom: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .featured-calculator {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

@media (max-width: 600px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}