/* NetFlow Page Specific Styles */

/* Tab Styles */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 0;
    margin-top: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
    width: 100%;
}

.tab {
    padding: 1rem 2rem;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-bottom: none;
    margin-right: 2px;
    border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-weight: 500;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.tab:hover {
    background-color: #e9ecef;
    color: var(--secondary-color);
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}

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

/* Deployment Steps Styles */
.deployment-steps {
    margin: 2rem 0;
}

.step-card {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.step-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #6c5ce7;
}

.step-number {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #2d3748;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content p {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.command-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    border: 1px solid #4a5568;
    margin: 0.5rem 0;
}

.deployment-options {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.option-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #6c5ce7;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.1);
}

.option-card h5 {
    color: #2d3748;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-card p {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.verification-commands,
.test-commands {
    margin-top: 1rem;
}

.verification-commands h5,
.test-commands h5 {
    color: #2d3748;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.device-config {
    margin-top: 1rem;
}

.device-config h5 {
    margin: 1.5rem 0 0.5rem 0;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

/* Troubleshooting Styles */
.troubleshooting {
    margin-top: 3rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #dee2e6;
}

.troubleshooting h4 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

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

.trouble-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.trouble-item:hover {
    border-color: #6c5ce7;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.1);
}

.trouble-item h5 {
    color: #e53e3e;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.trouble-item p {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.trouble-item ul {
    margin: 0;
    padding-left: 1.2rem;
}

.trouble-item li {
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Flow Types Table Styles */
.flow-types-table {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flow-types-table h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.flow-types-table p {
    margin: 0 0 1.5rem 0;
    color: var(--text-muted);
}

.flow-types {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flow-types thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

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

.flow-types th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-types td {
    font-size: 0.9rem;
    line-height: 1.4;
}

.flow-types tbody tr:hover {
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

.flow-types .recommended {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border-left: 4px solid var(--success-color);
}

.flow-types .recommended:hover {
    background: linear-gradient(135deg, #d4edda, #e8f5e8);
}

.flow-types code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.flow-note {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius-small);
    padding: 1rem;
    margin-top: 1rem;
}

.flow-note p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
}

.flow-note strong {
    color: #533f03;
}

/* Generate Button Override */
.generate-button {
    display: block;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.generate-button:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

/* Output Styles */
#config-output {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    max-height: 400px;
    overflow-y: auto;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.copy-button {
    background-color: var(--success-color);
    margin-top: 1rem;
}

.copy-button:hover {
    background-color: #218838;
}

.copy-button.copied {
    background-color: var(--warning-color);
    color: var(--text-color);
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

/* Specific Layout Adjustments for NetFlow Form */
fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: var(--section-padding);
    margin-bottom: 2rem;
    background: #fafafa;
}

legend {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 0 0.5rem;
}

/* Input specific styling for NetFlow */
input[type="number"] {
    width: 100%;
    padding: var(--input-padding);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--focus-color);
    box-shadow: var(--focus-shadow);
}

input[type="number"]:invalid {
    border-color: var(--error-color);
}

input[type="number"].error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.3);
}

/* Checkbox specific styling for NetFlow */
.checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Flow Type Select Enhancement */
#flow-type {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Enhanced Help Text */
.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Responsive adjustments for NetFlow page */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        margin-right: 0;
        margin-bottom: 2px;
        border-radius: var(--border-radius-small);
    }
    
    .tab-content {
        padding: 1rem;
        border-radius: var(--border-radius-small);
        min-width: auto;
    }
    
    .table-container {
        font-size: 0.8rem;
    }
    
    .devices-table th,
    .devices-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .devices-table input {
        min-width: 80px;
        font-size: 0.8rem;
    }
    
    .tag-container {
        min-width: 200px;
    }
    
    .tag-item input {
        min-width: 60px;
        font-size: 0.75rem;
        padding: 0.25rem;
    }
    
    .remove-tag {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .add-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
    
    .remove-device {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-width: 70px;
    }
    
    .generate-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    #config-output {
        font-size: 13px;
        max-height: 300px;
    }
    
    /* Parameter Explanation - Mobile */
    .parameter-explanation {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .explanation-title {
        font-size: 1.1rem;
    }
    
    .explanation-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .param-item {
        padding: 0.8rem;
    }
    
    .param-item h5 {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .param-item p {
        font-size: 0.85rem;
    }
    
    .example {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .required-badge,
    .optional-badge,
    .fixed-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .explanation-note {
        padding: 0.8rem;
    }
    
    .explanation-note h5 {
        font-size: 0.9rem;
    }
    
    .explanation-note li {
        font-size: 0.8rem;
    }
    
    /* デプロイメント手順 - Mobile */
    .step-card {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .troubleshooting-grid {
        grid-template-columns: 1fr;
    }
    
    .deployment-options {
        grid-template-columns: 1fr;
    }
    
    .command-block {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: 0.5rem;
        min-width: auto;
    }
    
    .devices-table {
        font-size: 0.75rem;
    }
    
    .devices-table th,
    .devices-table td {
        padding: 0.25rem;
    }
    
    .devices-table input {
        min-width: 60px;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .generate-button {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    #config-output {
        font-size: 12px;
        max-height: 250px;
    }
    
    .copy-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .remove-device {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        min-width: 60px;
    }
}

/* Print Styles */
@media print {
    .tabs,
    .form-actions,
    .copy-button {
        display: none;
    }
    
    .tab-content {
        display: block !important;
        border: none;
        padding: 0;
    }
    
    #config-output {
        max-height: none;
        overflow: visible;
        border: 1px solid #000;
    }
}

/* Device Table Styles */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.devices-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

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

.devices-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.devices-table tbody tr:hover {
    background-color: #f8f9fa;
}

.devices-table input[type="text"] {
    width: 100%;
    min-width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: inherit;
}

.devices-table input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.3);
}

/* Tag Container in Table */
.tag-container {
    min-width: 250px;
    max-height: 150px;
    overflow-y: auto;
}

.tag-item {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.tag-item input {
    flex: 1;
    min-width: 70px;
    padding: 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.8rem;
}

.remove-tag {
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.remove-tag:hover {
    background-color: #c82333;
}

.add-tag {
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
    transition: background-color 0.2s ease;
    width: 100%;
}

.add-tag:hover {
    background-color: #218838;
}

/* Remove Device Button */
.remove-device {
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    min-width: 80px;
}

.remove-device:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-device:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Parameter Explanation Styles */
.parameter-explanation {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.explanation-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.param-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.param-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.param-item h5 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.param-item p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.example {
    background: #f1f3f4;
    color: #495057;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

/* Badge Styles */
.required-badge,
.optional-badge,
.fixed-badge {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required-badge {
    background-color: var(--error-color);
    color: white;
}

.optional-badge {
    background-color: var(--info-color);
    color: white;
}

.fixed-badge {
    background-color: var(--text-muted);
    color: white;
}

/* Explanation Note */
.explanation-note {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    border-left: 4px solid var(--warning-color);
}

.explanation-note h5 {
    color: var(--warning-color);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.explanation-note ul {
    margin: 0;
    padding-left: 1.5rem;
}

.explanation-note li {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.explanation-note strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Error Message Styles */
.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 68, 68, 0.1);
    border-radius: 3px;
    border-left: 3px solid var(--error-color);
} 