:root {
    --primary-blue: #2563eb;
    --bg-gray: #f8fafc;
    --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.main-container {
    width: 80%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition);
}

.main-container.active {
    transform: translateY(-120px);
}

/* Header Styling */
.search-header {
    text-align: center;
    margin-bottom: 32px;
    transition: opacity 0.5s ease, transform var(--transition);
}

.search-header h1 {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: -1px;
}

.search-header p {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 1.1rem;
}

/* Fade and shrink the header when results are shown */
.active .search-header {
    opacity: 0.3;
    transform: scale(0.9);
    margin-top: 40%;
}

.search-section {
    width: 100%;
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

input {
    width: 100%;
    /* Extra right padding for the X button */
    padding: 16px 50px 16px 24px; 
    font-size: 18px;
    border: 2px solid transparent;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--primary-blue);
}

/* Clear Button Styling */
.clear-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    display: none; /* Hidden by default */
    user-select: none;
    transition: color 0.2s;
}

.clear-btn:hover {
    color: #1e293b;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    margin-top: 8px;
    border-radius: 12px;
    list-style: none;
    padding: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.suggestions li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.suggestions li:hover {
    background-color: #f1f5f9;
}

.result-section {
    margin-top: 30px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all var(--transition);
}

.active .result-section {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.foto-pegawai {
    border-radius: 10px;
    width: 120px;
    height: 180px;
}

td {
    vertical-align: top;
    font-size: 90%;
}
