/* Tools Page Specific Styles */

/* Main Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 64px);
    padding: 0;
    max-width: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--card-background);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: fixed;
    height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar .collection {
    border: none;
    margin: 0;
}

.sidebar .collection-item {
    border: none !important;
    padding: 16px 24px;
    cursor: pointer;
    transition: background-color 0.3s, border-left 0.3s;
    border-left: 4px solid transparent !important;
}

.sidebar .collection-item:hover {
    background-color: #e3f2fd;
}

.sidebar .collection-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid var(--primary-color) !important;
}

.sidebar .collection-item .category-icon {
    margin-right: 16px;
    color: var(--primary-color);
}

.sidebar .collection-item .category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar .collection-item .category-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

/* Content Area */
.content-area {
    margin-left: 280px;
    flex: 1;
    padding: 24px;
    display: flex;
}

.tools-panel {
    flex: 1;
    max-width: 800px;
}

/* Ad Space */
.ad-sidebar {
    width: 300px;
    margin-left: 24px;
    position: sticky;
    top: 24px;
    height: fit-content;
}

.ad-container {
    background: var(--card-background);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.ad-placeholder.large {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder.banner {
    min-height: 90px;
}

/* Route Cards */
.route-card {
    background: var(--card-background);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.route-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.route-card h5 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.route-card .route-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

.route-card .route-path {
    font-family: 'Roboto Mono', monospace;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: inline-block;
}

.route-card .input-field {
    margin-bottom: 16px;
}

.route-card .input-field label {
    color: var(--text-secondary);
}

.route-card .input-field input:focus,
.route-card .input-field textarea:focus {
    border-bottom-color: var(--primary-color) !important;
    box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

.route-card .input-field input:focus + label,
.route-card .input-field textarea:focus + label {
    color: var(--primary-color) !important;
}

.route-card .btn {
    background-color: var(--primary-color);
}

.route-card .btn:hover {
    background-color: var(--primary-dark);
}

/* Checkbox styling for parameters */
.route-card p {
    margin-bottom: 16px;
}

.route-card p label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.route-card p label input[type="checkbox"] {
    margin-right: 8px;
}

.route-card p label span {
    color: var(--text-primary);
    font-size: 14px;
}

/* Result Display */
.result-container {
    margin-top: 16px;
    display: none;
}

.result-container.show {
    display: block;
}

.result-box {
    background: #263238;
    color: #a5d6a7;
    border-radius: 4px;
    padding: 16px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-box.error {
    color: #ef9a9a;
}

.result-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.result-actions .btn-small {
    background-color: #455a64;
}

.result-actions .btn-small:hover {
    background-color: #546e7a;
}

/* Welcome Panel */
.welcome-panel {
    text-align: center;
    padding: 60px 24px;
}

.welcome-panel i.large-icon {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.welcome-panel h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.welcome-panel p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
}

.loading-spinner.show {
    display: inline-block;
}

/* Category Header */
.category-header {
    margin-bottom: 24px;
}

.category-header h4 {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.category-header h4 i {
    margin-right: 12px;
    color: var(--primary-color);
}

.category-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* History Panel */
.history-panel {
    background: var(--card-background);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.history-panel h6 {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.history-panel h6 i {
    margin-right: 8px;
    font-size: 18px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.history-item:hover {
    background: #e3f2fd;
}

.history-item .history-path {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: var(--primary-color);
}

.history-item .history-result {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content-area {
        margin-left: 0;
        flex-direction: column;
    }

    .main-container {
        flex-direction: column;
    }
}

/* Tooltip */
.copy-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-tooltip.show {
    opacity: 1;
}
