/* Subnet Calculator styles */

h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.description {
    margin-bottom: 15px;
    color: #ccc;
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.85rem;
    color: #aaa;
}

.network-input {
    width: 180px;
}

.mask-select {
    font-family: 'Consolas', 'Monaco', monospace;
    cursor: pointer;
    min-width: 200px;
}

.columns-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.columns-row > label {
    font-size: 0.9rem;
    color: #aaa;
}

.info-text {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.subnet-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #16213e;
}

.subnet-table th,
.subnet-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #333;
}

.subnet-table th {
    background-color: #1a1a2e;
    font-weight: 500;
    color: #aaa;
}

.subnet-table tr:hover {
    background-color: #1e2a4a;
}

.subnet-table td {
    font-family: 'Consolas', 'Monaco', monospace;
}

.divide-btn,
.join-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    background-color: #3a3a5a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
}

.divide-btn:hover,
.join-btn:hover {
    background-color: #4a4a6a;
}

.divide-btn:disabled,
.join-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Copy button styles */
.subnet-table td {
    position: relative;
}

.cell-content {
    margin-right: 24px;
}

.copy-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 3px 6px;
    font-size: 0.75rem;
    background-color: #3a3a5a;
    color: #aaa;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.copy-btn:hover {
    background-color: #4a4a6a;
    color: #fff;
}

.copy-btn.copied {
    background-color: #2a4a3a;
    border-color: #4ade80;
    color: #4ade80;
}

/* Depth indicators for split subnets */
.depth-0 { }
.depth-1 { background-color: rgba(102, 126, 234, 0.1); }
.depth-2 { background-color: rgba(102, 126, 234, 0.15); }
.depth-3 { background-color: rgba(102, 126, 234, 0.2); }
.depth-4 { background-color: rgba(102, 126, 234, 0.25); }

/* Responsive styles */
@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .network-input,
    .mask-select {
        width: 100%;
    }

    .subnet-table {
        font-size: 0.85rem;
    }

    .subnet-table th,
    .subnet-table td {
        padding: 6px 8px;
    }
}
