* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    padding: 0;
    color: #333;
    overflow: hidden;
}

.container {
    max-width: 100%;
    height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3c72;
}

.header-icon {
    color: #4dabf7;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    background: rgba(0, 0, 0, 0.03);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background: #4dabf7;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #3a8fd4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #ff6b6b;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #e55a5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: #40c057;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #37b24d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.content {
    display: flex;
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
}

.input-card {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 360px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    z-index: 5;
    backdrop-filter: blur(20px);
    /* Remove transform: translateY here */
    transition: all 0.3s ease-out; /* Add transition for padding and other properties if needed */
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex; /* Use flexbox for inner layout */
    flex-direction: column; /* Stack items vertically */
    overflow: hidden; /* Hide overflow during collapse */
}

/* New class for the collapsable content */
.input-card-content {
    max-height: 500px; /* A value larger than the max possible height when open */
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.input-card.minimized .input-card-content {
    max-height: 0; /* Collapse the content */
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.input-card.minimized {
    padding-bottom: 12px; /* Adjust padding for the minimized state if needed */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.input-card.minimized .card-header {
    margin-bottom: 0; /* Remove margin when minimized */
    padding-bottom: 0; /* Remove padding when minimized */
    border-bottom: none; /* Remove border when minimized */
}


.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.minimize-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimize-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.92rem;
    resize: vertical;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

.progress-container {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #4dabf7;
    border-radius: 3px;
    transition: width 0.3s ease-out;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #333;
}

.status-bar i {
    color: #1890ff;
}

.results-panel {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 320px;
    height: calc(70% - 40px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    z-index: 5;
    backdrop-filter: blur(20px);
    overflow-y: auto;
    display: none; /* Hidden by default */
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.results-panel.visible {
    display: block; /* Show when visible class is added */
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    padding: 12px;
    background-color: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.result-address {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    word-break: break-all;
}

.result-coords {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    word-break: break-all;
}

.result-error {
    font-size: 0.85rem;
    color: #e03131;
    margin-top: 4px;
}

/* Custom InfoWindow styles */
.info-window-content {
    padding: 10px 15px;
    max-width: 300px;
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.info-detail .info-icon {
    color: #4dabf7;
    margin-top: 2px;
    font-size: 1.1em;
}

.info-coords {
    font-family: 'Courier New', monospace;
    background-color: #f0f4f7;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #2c3e50;
}

.distance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.9rem;
    color: #666;
}

.distance-list {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.distance-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
    color: #444;
}

.distance-number {
    font-weight: bold;
    color: #ff6b6b;
    margin-left: auto;
}

/* Address Table Modal */
.address-table-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.address-table-modal.visible {
    opacity: 1;
    visibility: visible;
}

.table-container {
    background: white;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1000px;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.table-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3c72;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.table-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.address-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    white-space: nowrap;
}

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

.address-table th {
    background-color: #f7f7f7;
    color: #555;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

.address-table tbody tr:hover {
    background-color: #f5f5f5;
}

.address-table .success-row {
    color: #333;
}

.address-table .error-row {
    color: #e03131;
    background-color: #fff0f0;
}

.address-table .coords-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.counter {
    font-size: 0.95rem;
    color: #555;
}

.counter span {
    font-weight: bold;
    margin-right: 5px;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #40c057;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, bottom 0.3s ease;
    z-index: 1000;
}

.copy-notification.visible {
    opacity: 1;
    visibility: visible;
    bottom: 50px;
}