/*
 * Network Site Details Shortcode Styles
 * Version: 2.1.3
 */

:root {
    --telkom-red: #A31E21;
    --telkom-dark-grey: #333333;
    --telkom-light-grey: #f0f2f5;
    --telkom-text: #4a4a4a;
    --telkom-text-light: #7a7a7a;
    --telkom-border: #e0e0e0;
    --telkom-white: #ffffff;
}

#nsd-dashboard-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--telkom-light-grey);
    padding: 1rem;
    border-radius: 8px;
}

/* Chart Container */
.nsd-chart-container {
    background-color: var(--telkom-white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--telkom-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 300px;
}

/* Summary Cards */
.nsd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.nsd-summary-card {
    background-color: var(--telkom-white);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--telkom-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}
.nsd-summary-card.nsd-clickable:hover {
    cursor: pointer;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}
.nsd-summary-card.nsd-active-filter {
    border-color: var(--telkom-red);
    box-shadow: 0 0 0 3px rgba(163, 30, 33, 0.2);
}
.nsd-summary-card .label {
    font-size: 0.85rem;
    color: var(--telkom-text-light);
    margin-bottom: 0.5rem;
}
.nsd-summary-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--telkom-red);
}

/* Controls */
.nsd-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--telkom-white);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--telkom-border);
}

.nsd-search-wrapper input,
.nsd-filters-wrapper select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--telkom-border);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.nsd-filters-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.nsd-actions-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.nsd-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}
.nsd-btn-primary { background-color: var(--telkom-red); color: var(--telkom-white); }
.nsd-btn-primary:hover { background-color: #8B1A1D; }

.nsd-view-toggle { display: flex; }
.nsd-btn-icon {
    background-color: #e9ecef;
    color: var(--telkom-dark-grey);
    padding: 0.75rem;
    width: 50%;
}
.nsd-btn-icon:first-child { border-radius: 6px 0 0 6px; }
.nsd-btn-icon:last-child { border-radius: 0 6px 6px 0; }
.nsd-btn-icon.active { background-color: var(--telkom-dark-grey); color: var(--telkom-white); }

/* Desktop layout for controls */
@media (min-width: 1024px) {
    .nsd-controls-wrapper {
        display: grid;
        grid-template-columns: minmax(200px, 1.5fr) 3fr 1.5fr;
    }
    .nsd-filters-wrapper { display: flex; flex-wrap: wrap; }
    .nsd-actions-wrapper { display: flex; justify-content: flex-end; }
}

/* Data Display */
#nsd-data-container.nsd-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
#nsd-data-container.nsd-list-view { display: block; }
.nsd-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.nsd-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07); }
.nsd-card-header { padding: 1.5rem; border-bottom: 1px solid #e5e7eb; }
.nsd-card-header h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.nsd-card-header h2 a { text-decoration: none; color: var(--telkom-red); transition: color 0.2s; }
.nsd-card-header h2 a:hover { color: var(--telkom-dark-grey); }
.nsd-card-url { font-size: 0.875rem; color: #6b7280; margin: 0.25rem 0 0; word-break: break-all; }
.nsd-card-body { padding: 1.5rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; flex-grow: 1; }
.nsd-stat { background-color: #f9fafb; padding: 1rem; border-radius: 0.5rem; text-align: center; }
.nsd-stat-label { display: block; font-size: 0.875rem; color: #6b7280; margin-bottom: 0.5rem; }
.nsd-stat-value { display: block; font-size: 1.875rem; font-weight: 700; color: var(--telkom-dark-grey); }
.nsd-stat-value-small { display: block; font-size: 1rem; color: #374151; }
.nsd-stat-full { grid-column: 1 / -1; }
.nsd-list-table { width: 100%; border-collapse: collapse; background: var(--telkom-white); border-radius: 8px; overflow: hidden; border: 1px solid var(--telkom-border); }
.nsd-list-table th, .nsd-list-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--telkom-border); }
.nsd-list-table th { background-color: #f8f9fa; font-weight: 600; color: var(--telkom-text-light); }
.nsd-list-table tr:last-child td { border-bottom: none; }
.nsd-list-table tr:hover { background-color: #f1f3f5; }
.nsd-no-results { padding: 2rem; text-align: center; color: var(--telkom-text-light); }

/* Pagination */
.nsd-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.nsd-pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--telkom-border);
    background: var(--telkom-white);
    cursor: pointer;
    border-radius: 4px;
    color: var(--telkom-text) !important;
    font-size: 0.9rem;
    line-height: 1.5;
}
.nsd-pagination-btn.active {
    background-color: var(--telkom-red);
    color: var(--telkom-white) !important;
    border-color: var(--telkom-red);
}
.nsd-pagination-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.nsd-page-info {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--telkom-text-light);
}
