/* General Styling */
body {
    font-family: 'Inter', sans-serif;
}

.adg-direktori-wrapper {
    margin: 0 auto;
    max-width: 800px;
    padding: 1rem;
}

.adg-direktori-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.adg-direktori-title {
    font-size: 1.5rem; /* Adjusted for better mobile view */
    line-height: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.adg-direktori-subtitle {
    color: #4b5563;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.adg-direktori-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

/* Accordion Styling */
.adg-province-item {
    border-bottom: 1px solid #e5e7eb;
}

.adg-province-item.last,
.adg-province-item:last-child {
    border-bottom: none;
}

.adg-province-header {
    width: 100%;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.adg-province-header:hover {
    background-color: #f9fafb;
}

.adg-province-header.active {
    background-color: #eef2ff;
    color: #4f46e5;
}

.adg-accordion-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s;
}

.adg-province-header.active .adg-accordion-icon {
    transform: rotate(180deg);
}

.adg-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #f9fafb;
}

.adg-city-list-container {
    padding: 0.5rem 1rem 1rem 1rem;
}

.adg-city-link {
    display: block;
    font-size: 0.875rem;
    color: #4b5563;
    padding: 0.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, font-weight 0.2s;
}

.adg-city-link:hover {
    background-color: #eff6ff;
}

.adg-city-link.active {
    background-color: #dbeafe;
    font-weight: 600;
    color: #1e40af;
}

/* Agents Styling */
.adg-agents-container {
    display: none;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
    margin-top: 0.5rem;
}

.adg-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: #4b5563;
}

.adg-result-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column for mobile */
    gap: 1rem;
    padding-top: 1rem;
}

.adg-agen-card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.adg-agen-card-body {
    flex-grow: 1;
}

.adg-agen-nama {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    margin: 0;
}

.adg-star-icon {
    width: 1rem;
    height: 1rem;
    color: #f59e0b;
    margin-left: 0.25rem;
}

.adg-agen-info {
    color: #4b5563;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start; /* Align icon and text to top */
    margin-bottom: 0;
}

.adg-agen-info.adg-agen-telepon {
    font-size: 0.875rem;
}
.adg-agen-info.adg-agen-alamat {
    font-size: 0.8rem;
}


.adg-agen-info svg {
    height: 1rem;
    width: 1rem;
    margin-right: 0.5rem;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 0.125rem;
}
.adg-agen-info span {
     word-break: break-word;
}

.adg-agen-catatan {
    background-color: #d1fae5;
    color: #047857;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
}

.adg-agen-catatan svg {
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.adg-whatsapp-button {
    margin-top: 1rem;
    width: 100%;
    background-color: #22c55e;
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
}

.adg-whatsapp-button:hover {
    background-color: #16a34a;
    color: #ffffff;
}

.adg-whatsapp-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #9ca3af;
}
.adg-whatsapp-button.disabled:hover {
    background-color: #9ca3af;
}

.adg-whatsapp-button svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.adg-no-results {
    grid-column: 1 / -1;
    text-align: center;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.adg-no-results h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.adg-no-results p {
    color: #6b7280;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.adg-error-message {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
    padding: 1rem;
    margin-top: 1rem;
}

/* Media Queries for Responsiveness */
@media (max-width: 640px) {
    .adg-direktori-card {
        padding: 1rem;
    }
    .adg-direktori-title {
        font-size: 1.25rem;
    }
    .adg-direktori-subtitle {
        font-size: 0.85rem;
    }
}

@media (min-width: 640px) {
    .adg-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .adg-direktori-title {
        font-size: 1.875rem;
    }
}

@media (min-width: 768px) {
    .adg-result-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}
