/* Custom styles for Route Flowchart Generator */
.route-app {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    font-family: var(--font-text);
}

.app-header {
    margin-bottom: 24px;
}

.app-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.app-version {
    font-size: 13px;
    color: #86868b;
}

.mode-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.mode-tab {
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    color: #86868b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.mode-tab:hover {
    color: var(--color-text-primary);
}

.mode-tab.active-tab {
    color: var(--color-brand-teal);
    border-bottom-color: var(--color-brand-teal);
}

.mode-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mode-content:not(.hidden) {
    display: block;
}

/* Summary Section */
.summary-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.summary-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-box {
    background: var(--color-section-bg);
    padding: 16px;
    border-radius: 8px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 14px;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-brand-teal);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-brand-teal);
}

.stat-value.success {
    color: #34c759;
}

.settings-area {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.settings-group {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-label,
.check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Route Blocks Container */
.route-blocks-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Added dynamically by JS */
.route-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Source Mode */
.source-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px;
}

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

.source-textarea {
    width: 100%;
    height: 400px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    resize: vertical;
    outline: none;
}

/* Preview Mode */
.preview-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 32px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Extracted from Tailwind JS classes */
.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}
.block-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand-teal);
}
.delete-block-btn {
    color: #86868b;
    background: none;
    border: none;
    cursor: pointer;
}
.delete-block-btn:hover {
    color: #ff3b30;
}
.block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.transport-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px dashed var(--color-border);
}
.transport-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.transport-title i {
    color: #86868b;
    margin-right: 8px;
}
.fare-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.fare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: var(--color-section-bg);
    padding: 16px;
    border-radius: 8px;
}
.fare-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.discount-box {
    margin-top: 8px;
    padding: 12px;
    background: var(--color-section-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.add-waypoint-btn-container {
    margin: 16px 0;
    text-align: center;
    position: relative;
}
.add-waypoint-btn-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-border);
    z-index: 0;
}
.add-waypoint-btn {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
    color: var(--color-brand-teal);
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--color-brand-teal);
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.add-waypoint-btn:hover {
    background: var(--color-section-bg);
}
:root[saved-theme="dark"] .add-waypoint-btn:hover {
    background: rgba(255,255,255,0.05);
}
.hidden {
    display: none !important;
}
.inline-flex {
    display: inline-flex;
    align-items: center;
}
.ml-2 {
    margin-left: 8px;
}
.space-x-4 {
    display: flex;
    gap: 16px;
}
.mt-3 {
    margin-top: 12px;
}