@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400&display=swap');

body {
    font-family: Cairo;
    background-color: white;
    color: #003399;
}

/* Search Bar */
.search-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: white;
}

.search-form{
    display: contents;
}

.search-box {
    width: 50%;
    padding: 10px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: Cairo;
    color: #003399;
    font-weight: 400;

}

.search-button {
    padding: 10px 15px;
    /*background-color: rgb(5, 154, 229);*/
    background-color: #0BB2B1;
    border: 2px solid #0BB2B1;
    color: white;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 5px;
    transition-duration: 250ms;
    transition-property: border-color, background, color;
    transition-timing-function: ease-in-out;
}
.search-button:hover{
    background-color: white;
    color: #0BB2B1;
    border: 2px solid #0BB2B1;
}

/* Main Content */
.main-container {
    display: flex;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Results Section */
.results-container {
    flex-grow: 1;
    padding-left: 20px;
    /*background: linear-gradient(to bottom right, #f1faff, #ffffff);*/
    background: white;
}

.results-container ul{
    list-style: none;
}

.result-item {
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between; /* Distribute space between title and actions */
    align-items: flex-start; /* Align title and buttons at the top */
    max-width: 100%;
}

.result-title {
    font-size: 22px;
    font-weight: bold;
    color: rgb(0, 100, 139);
    flex-grow: 1; /* Allows the title to take available space */
    margin: 0;
}

.result-title p {
    margin-bottom: 4px;
}

.result-meta {
    font-size: 16px;
    color: #666;
    max-width: 90%;
}

.result-meta p {
    margin-top: 4px;
    text-align: justify;
    margin-right: 40px;
}

.result-actions {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    align-items: flex-end; /* Align buttons to the right */
    text-align: left;
}

.result-actions button {
    margin-top: 22px;
    padding: 10px 15px;
    margin-bottom: 10px; /* Adds space between buttons */
    border: 2px solid;
    cursor: pointer;
    color: white;
    border-radius: 5px;
    background-color: #0583F2;
    font-size: 18px;
    width: 150px; /* Ensures all buttons are the same width */
    transition-duration: 250ms;
    transition-property: border-color, background, color;
    transition-timing-function: ease-in-out;
}

.result-actions button:hover {
    background-color: white;
    color: #0583F2;
    border: 2px solid #0583F2;
}

/* Keyword Tags - Google-style - Arevik */
.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.tag {
    font-size: 0.85rem;
    padding: 6px 16px;
    background-color: #fff;
    color: #0D4688; /* muted grey */
    border: 1px solid #dadce0;
    border-radius: 9999px;
    white-space: nowrap;
    font-family: Cairo, sans-serif;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
}

.tag:hover {
    background-color: #f1f3f4;
}

.pagination {
    display: block;
    flex-direction: column;
    align-items: flex-end;
    text-align: center;
    padding: 15px;
    font-size: 18px;
}

.pagination i {
    cursor: pointer;
}
.pagination i:hover {
    color: #3187C8;
}
#resultSizeWrapper {
    display: flex;
    justify-content: space-between;
    align-items: center; /* optional: vertically align items */
}
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
