.app-container {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .app-container {
        flex-direction: row;
        height: 850px;
    }
}

.sidebar {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

.map-view {
    flex: 1;
    min-height: 400px;
}

#map {
    width: 100%;
    height: 100%;
}

.trip-type-toggle {
    display: flex;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
}

.trip-type-toggle label {
    margin-right: 15px;
}

.trip-type-toggle input {
    margin-right: 5px;
}

.header-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.header-inputs .input-group:first-child {
    width: 30%;
    margin-right: 15px;
}

.header-inputs .input-group:last-child {
    width: 65%;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #64748b;
}

.input-box {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 34px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    z-index: 2;
}

.timeline-badge {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    border: 4px solid #ffffff;
}

.timeline-content {
    margin-left: 45px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.step-title {
    font-weight: 600;
    font-size: 1rem;
}

.ride-duration {
    font-size: 0.8rem;
    color: #64748b;
    background: #e0e7ff;
    padding: 4px 8px;
    border-radius: 12px;
}

.location-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.time-inputs {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.time-inputs span {
    margin-right: 10px;
}

.time-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.add-link-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
}

.btn-search {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
}

.btn-search:hover {
    opacity: 0.9;
}

.alert.error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.stop-duration-info {
    font-size: 0.85rem;
    color: #d97706;
    margin-top: 5px;
    font-weight: 500;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.result-box {
    margin-top: 20px;
}

/* ЗАЩИТА ОТ СТИЛЕЙ ТЕМЫ WORDPRESS (Исправление белого текста) */
.app-container label,
.app-container span,
.app-container input,
.app-container select {
    color: #1e293b !important;
}

.app-container input::placeholder {
    color: #94a3b8 !important;
}

.app-container input,
.app-container select {
    background-color: #ffffff !important;
}