/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 */



/* Sticky footer styles
-------------------------------------------------- */

html,
body {
    height: 100%;
    /* The html and body elements cannot have any padding or margin. */
}

/* Wrapper for page content to push down footer */
#wrap {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    /* Negative indent footer by it's height */
    margin: 0 auto -50px;
}

/* Set the fixed height of the footer here */
#push,
#footer {
    height: 50px;
}
#footer {
    text-align: center;
}
#footer p {
    font-size: 21px;
    font-weight: 200;
    line-height: 50px;
    margin: 0;
}

/* Feed discovery on the index page */
.feed-finder {
    margin-top: 2rem;
    text-align: left;
}

.feed-finder ul {
    margin-top: .75rem;
}

.feed-finder li {
    margin-bottom: .5rem;
}

.feed-finder .btn-mini {
    margin-left: 0;
    margin-right: .35rem;
}

.feed-result {
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    padding: .85rem 1rem;
    background: #fafafa;
}

.feed-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
}

.feed-result-title {
    font-weight: 600;
    word-break: break-word;
}

.feed-result-type {
    font-size: .72rem;
    color: #555;
    background: #eee;
    border-radius: 3px;
    padding: .1rem .4rem;
}

.feed-result-url {
    font-family: Menlo, Consolas, monospace;
    font-size: .78rem;
    color: #666;
    word-break: break-all;
    margin: .3rem 0 .55rem;
}

.feed-result-actions .btn {
    margin-right: .35rem;
}

/* Slide-in feed preview panel */
.feed-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.feed-preview-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.feed-preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 26rem;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    border-left: 1px solid #ddd;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .28s ease, visibility .28s ease;
}

.feed-preview-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

body.feed-preview-open {
    overflow: hidden;
}

.feed-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #eee;
}

.feed-preview-heading {
    min-width: 0;
}

.feed-preview-kicker {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: .2rem;
}

.feed-preview-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
    word-break: break-word;
}

.feed-preview-close {
    border: 0;
    background: transparent;
    color: #777;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0 .2rem;
    cursor: pointer;
}

.feed-preview-close:hover,
.feed-preview-close:focus {
    color: #222;
}

.feed-preview-body {
    flex: 1;
    overflow-y: auto;
    padding: .25rem 1.1rem 1rem;
}

.feed-preview-item {
    padding: .9rem 0;
    border-bottom: 1px solid #eee;
}

.feed-preview-item:last-child {
    border-bottom: 0;
}

.feed-preview-item-title {
    margin: 0 0 .3rem;
    font-size: .98rem;
    line-height: 1.35;
}

.feed-preview-meta {
    color: #888;
    font-size: .76rem;
    margin-bottom: .35rem;
}

.feed-preview-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: .4rem 0;
    border-radius: 4px;
}

.feed-preview-summary {
    color: #333;
    font-size: .88rem;
    line-height: 1.5;
}

.feed-preview-summary img {
    max-width: 100%;
    height: auto;
}

.feed-preview-summary p {
    margin: .4rem 0;
}

.feed-preview-footer {
    display: flex;
    gap: .5rem;
    padding: .8rem 1.1rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.feed-preview-footer .btn {
    margin: 0;
}

.feed-finder-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1070;
    padding: .5rem .8rem;
    border-radius: 4px;
    background: #111;
    color: #fff;
    font-size: .8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-.4rem);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.feed-finder-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
    #footer {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* RSS Finder home */
.rss-finder-home {
    text-align: center;
    font-style: normal;
    padding-bottom: 3rem;
}

.rss-finder-home .pol-brand {
    display: none;
}

.rss-finder-home .pol-brand img {
    display: block;
    max-width: 150px;
    height: auto;
    margin: 0 auto .5rem;
}

.rss-finder-home .pol-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.rss-finder-hero {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

.rss-finder-title {
    font-size: 2.6rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #2563eb;
    margin: 0 0 .6rem;
}

.rss-finder-subtitle {
    color: #6b7280;
    font-size: 1.05rem;
    margin: 0 0 2rem;
}

.rss-search-form {
    max-width: 42rem;
    margin: 0 auto;
}

.rss-search-box {
    display: flex;
    align-items: stretch;
    gap: .5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .35rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.rss-search-box #id_url {
    flex: 1;
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: .85rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    color: #111827;
    outline: none;
}

.rss-search-box #id_url:focus {
    outline: none;
    box-shadow: none;
}

.rss-search-button {
    border: 0;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: .85rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.rss-search-button:hover {
    background: #1d4ed8;
}

.rss-search-button:disabled {
    opacity: .6;
    cursor: wait;
}

.rss-search-help {
    color: #6b7280;
    font-size: .85rem;
    margin: .75rem 0 2rem;
}

.rss-finder-status {
    min-height: 1.6rem;
    color: #6b7280;
    font-size: .95rem;
    margin-bottom: 1rem;
}

.rss-finder-results {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 42rem;
    text-align: left;
}

.rss-finder-results .feed-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.rss-finder-results .feed-result-main {
    min-width: 0;
}

.rss-finder-results .feed-result-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.rss-finder-results .feed-result-title {
    color: #111827;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    word-break: break-word;
}

.rss-finder-results .feed-result-title:hover {
    color: #2563eb;
}

.rss-finder-results .feed-result-type {
    font-size: .7rem;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 999px;
    padding: .15rem .5rem;
}

.rss-finder-results .feed-result-url {
    color: #6b7280;
    font-family: inherit;
    font-size: .8rem;
    margin: .3rem 0 0;
    word-break: break-all;
}

.rss-finder-results .feed-result-actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}

.rss-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: .45rem .8rem;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.rss-action:hover {
    text-decoration: none;
}

.rss-action-outline {
    border-color: #bfdbfe;
    color: #2563eb;
    background: #fff;
}

.rss-action-outline:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.rss-action-primary {
    background: #2563eb;
    color: #fff;
}

.rss-action-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.rss-action-muted {
    border-color: #e5e7eb;
    color: #374151;
    background: #fff;
}

.rss-action-muted:hover {
    background: #f9fafb;
    color: #111827;
}

@media (max-width: 640px) {
    .rss-finder-title {
        font-size: 2rem;
    }

    .rss-search-box {
        flex-direction: column;
    }

    .rss-search-button {
        width: 100%;
    }

    .rss-finder-results .feed-result {
        flex-wrap: wrap;
        align-items: center;
    }

    .rss-finder-results .feed-result-actions {
        width: 100%;
    }

    .rss-finder-results .rss-action {
        flex: 1;
    }
}


.rss-finder-results .feed-result-main {
    flex: 1;
}

.rss-finder-results .feed-result-favicon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 9px;
    object-fit: contain;
    background: #f3f4f6;
    padding: 4px;
}

.feed-preview-title-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.feed-preview-favicon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 4px;
    object-fit: contain;
    background: #f3f4f6;
}
