/*
 * style.css for National Day Finder Plugin (Expandable Card Version)
 */

#national-day-finder-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

/* Controls Section */
.ndf-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.ndf-controls input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3338;
}

.ndf-controls button {
    background-color: #2271b1;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.ndf-controls button:hover {
    background-color: #135e96;
}

/* Grid for Cards */
#ndf-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Card Styling */
.ndf-card {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden; /* Crucial for trivia drawer */
    transition: box-shadow 0.2s ease;
}

.ndf-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ndf-card-main {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
}

.ndf-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2271b1;
    background: #f0f6fb;
    padding: 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

.ndf-card-icon svg {
    width: 22px;
    height: 22px;
}

.ndf-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ndf-card-title {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
    font-weight: 600;
}

/* Toggle Button */
.ndf-toggle-btn {
    background: none;
    border: none;
    color: #2271b1;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ndf-arrow {
    font-size: 9px;
    transition: transform 0.3s ease;
}

/* Trivia Drawer Styling */
.ndf-trivia-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f9f9f9;
}

.ndf-trivia-inner {
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #50575e;
    border-top: 1px solid #eee;
}

/* Messages */
.ndf-message, .ndf-error {
    grid-column: 1 / -1;
    padding: 15px;
    border-radius: 4px;
}

.ndf-message { background: #f6f7f7; }
.ndf-error { background: #fcf0f1; color: #d63638; border-left: 4px solid #d63638; }

/* Mobile Responsiveness */
@media (max-width: 600px) {
    #ndf-results-list { grid-template-columns: 1fr; }
}