/* Reserved IP Address Checker CSS */

/* General Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    margin-top: 0;
}

p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.tool-description {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 5px solid #007bff;
}

/* Card Styles */
.card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-link {
    background: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    margin-right: 5px;
    margin-bottom: -1px;
    transition: 0.3s;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border: 1px solid transparent;
}

.tab-link:hover {
    background-color: #e9ecef;
}

.tab-link.current {
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom: 1px solid #fff;
    color: #007bff;
    font-weight: bold;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 15px 0;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary, .btn-secondary, .btn-sm {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
    background-color: #007bff;
    color: #fff;
}

.btn-sm:hover {
    background-color: #0069d9;
}

/* Results Styling */
.results-section {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.result-card {
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.result-card.reserved {
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.result-card.not-reserved {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.result-card.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-body {
    margin-bottom: 15px;
}

.result-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-success {
    background-color: #28a745;
    color: #fff;
}

.matched-ranges {
    margin-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

.range-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(255,255,255,0.6);
    border-radius: 4px;
}

/* Batch Results Styling */
.batch-summary {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.batch-summary p {
    margin-right: 30px;
    margin-bottom: 0;
}

.batch-results-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr.invalid {
    background-color: #f8d7da;
}

tr.reserved {
    background-color: #fff3cd;
}

tr.not-reserved {
    background-color: #d4edda;
}

.details-row {
    background-color: #f8f9fa;
}

.ip-details {
    padding: 15px;
}

.export-options {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Educational Tab Styling */
.address-space-visualization {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.ipv4-map {
    height: 400px;
    background-color: #fff;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    padding: 10px;
    overflow: hidden;
    position: relative;
}

.visualization-note {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.categories-section {
    margin-bottom: 30px;
}

.category-card {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    border-left: 5px solid #ddd; /* Default border, will be overridden by category-specific classes */
}

.category-private {
    border-left-color: #4CAF50;
}

.category-loopback {
    border-left-color: #2196F3;
}

.category-link-local {
    border-left-color: #9C27B0;
}

.category-multicast {
    border-left-color: #FF9800;
}

.category-broadcast {
    border-left-color: #F44336;
}

.category-documentation {
    border-left-color: #607D8B;
}

.category-special {
    border-left-color: #795548;
}

.category-reserved {
    border-left-color: #9E9E9E;
}

.category-cgnat {
    border-left-color: #00BCD4;
}

.category-transition {
    border-left-color: #3F51B5;
}

.category-deprecated {
    border-left-color: #E91E63;
}

.ranges-table {
    margin-top: 15px;
    margin-bottom: 15px;
}

.usage-examples {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reference-section {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.reference-section ul {
    padding-left: 20px;
}

.reference-section li {
    margin-bottom: 8px;
}

/* API Documentation Styling */
.api-endpoint {
    margin-bottom: 30px;
}

.endpoint-card {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 5px solid #17a2b8;
}

.code-example {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 15px;
}

.code-example h5 {
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #ddd;
    background-color: #f2f2f2;
}

.code-example pre {
    margin: 0;
    padding: 15px;
    overflow-x: auto;
}

.code-example code {
    font-family: monospace;
}

.api-usage {
    margin-bottom: 30px;
}

.api-code-samples {
    margin-top: 30px;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.code-tab {
    background: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    margin-right: 5px;
    margin-bottom: -1px;
    transition: 0.3s;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border: 1px solid transparent;
}

.code-tab:hover {
    background-color: #e9ecef;
}

.code-tab.active {
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom: 1px solid #fff;
    color: #007bff;
    font-weight: bold;
}

.code-sample {
    display: none;
}

.code-sample.active {
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tab-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .batch-summary {
        flex-direction: column;
    }
    
    .batch-summary p {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .badge {
        margin-top: 5px;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .export-options button {
        margin-bottom: 10px;
    }
}

/* IP Address Visualization Elements */
.ip-block {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.1);
}

.ip-block:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.tooltip {
    position: absolute;
    display: none;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    z-index: 100;
    max-width: 300px;
    font-size: 12px;
}

/* Range Colors matching the category borders */
.range-private {
    background-color: rgba(76, 175, 80, 0.7);
}

.range-loopback {
    background-color: rgba(33, 150, 243, 0.7);
}

.range-link-local {
    background-color: rgba(156, 39, 176, 0.7);
}

.range-multicast {
    background-color: rgba(255, 152, 0, 0.7);
}

.range-broadcast {
    background-color: rgba(244, 67, 54, 0.7);
}

.range-documentation {
    background-color: rgba(96, 125, 139, 0.7);
}

.range-special {
    background-color: rgba(121, 85, 72, 0.7);
}

.range-reserved {
    background-color: rgba(158, 158, 158, 0.7);
}

.range-cgnat {
    background-color: rgba(0, 188, 212, 0.7);
}

/* Legend for visualization */
.legend {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border: 1px solid rgba(0,0,0,0.1);
} 