/* Top bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.72rem;
    color: #aaa;
}
.live-dot {
    width: 6px; height: 6px;
    background: #5db389;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Grid */
.clocks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
@media (min-width: 560px) {
    .clocks-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
    .clocks-grid { grid-template-columns: repeat(3, 1fr); }
}

.clock-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 1.25rem 1.1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.clock-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.city-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}
.city-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.15rem;
}
.clock-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    transition: color 0.12s;
    flex-shrink: 0;
}
.clock-remove:hover { color: #888; }

.clock-time-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-variant-numeric: tabular-nums;
    margin-top: 0.4rem;
}
.clock-time {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}
.clock-seconds {
    font-size: 1rem;
    font-weight: 600;
    color: #888;
}
.clock-ampm {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    margin-left: 0.15rem;
}
.clock-offset {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.35rem;
}

/* Add city / search */
.add-city-section {
    background: #fff;
    border: 1.5px dashed #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    position: relative;
}
.add-city-section.compact { padding: 0.7rem 1rem; }
.add-city-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    color: #888;
    width: 100%;
    transition: color 0.12s;
}
.add-city-btn:hover { color: #1a1a1a; }

.city-search-box {
    display: none;
    position: relative;
}
.city-search-box.visible { display: block; }
.city-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1.5px solid #d0d0ce;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #1a1a1a;
    box-sizing: border-box;
}
.city-search-input:focus { border-color: #888; }
.city-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.09);
}
.city-suggestions:empty { display: none; }
.city-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid #f5f5f3;
    transition: background 0.1s;
}
.city-suggestion:last-child { border-bottom: none; }
.city-suggestion:hover, .city-suggestion.active { background: #f5f5f3; }
.city-suggestion .sug-country { color: #aaa; font-size: 0.78rem; margin-left: 0.4em; }
.city-search-msg { font-size: 0.8rem; color: #aaa; padding: 0.4rem 0.75rem; }
.max-msg { font-size: 0.8rem; color: #aaa; text-align: center; }

@media (max-width: 480px) {
    .clock-time { font-size: 1.75rem; }
}
