/**
 * Add New Popup Page Styles
 *
 * Styles for the Add New Popup page including extension cards
 * Loaded on: add-new-instant-popup page
 */

/* Extension search and filters */
.ipb_extensions {
    float: right;
}

.ipb_extensions a#ipb_ext_btn,
a#ipb_ext_btn {
    background: #1A73E8;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
}

.ipb_middle_btns {
    padding: 15px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

input#search_ipb_extension::placeholder {
    color: #1E1F21;
    font-size: 18px;
    font-weight: 400;
}

a#ipb_ext_btn {
    float: right;
}

input#search_ipb_extension {
    font: 18px;
    padding-left: 30px;
    border: none;
}

.ipb_ext_search span.s_icon {
    cursor: pointer;
    position: absolute;
}

.ipb_ext_search {
    flex: 0 0 22% !important;
    position: relative;
    background: white;
    border-radius: 50px;
    padding: 9px;
}

input#search_ipb_extension:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.ipb_ext_search i {
    font-size: 16px;
    position: relative;
    top: 8px;
    left: 3px;
}

.ipb_show_more {
    flex: 0 0 50% !important;
    text-align: center;
}

.ipb_pro_ext {
    flex: 0 0 23%;
}

.ipb_show_more p {
    cursor: pointer;
    color: #1E1F21;
    font-size: 16px;
    font-weight: 400;
}

.ipb_new_heading {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    width: 100%;
}

.ipb_new_heading h3 {
    background: #1A73E8;
    padding: 10px 24px;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    width: fit-content;
}

/* Extension cards grid */
.ipb_installed_popup {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    padding: 22px 0;
    justify-content: start;
}

.ipb_installed_popup .ipb_grid {
    position: relative;
    cursor: pointer;
    background: white;
    flex: 0 0 calc(25% - 15px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.ipb_installed_popup .ipb_grid:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ipb_installed_popup .ipb_grid .thumb {
    width: 64px;
    height: 64px;
    background: #1A73E8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipb_installed_popup .ipb_grid .thumb i {
    font-size: 28px;
    color: white;
    display: inline-block;
}

.ipb_installed_popup .ipb_grid .thumb i::before {
    color: white !important;
}

.ipb_installed_popup .ipb_grid .thumb img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ipb_installed_popup .ipb_grid .thumb_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
}

.ipb_installed_popup .ipb_grid .read_more {
    margin-top: 0;
    flex-shrink: 0;
}

a.pro_btn {
    background: #1A73E8;
    padding: 10px 24px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

a.pro_btn:hover {
    background: #1557B0;
}

.ipd_content {
    flex: 1;
    width: 100%;
}

.ipd_content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    margin: 0 0 8px 0;
    color: #1E1F21;
}

.ipd_content p {
    width: 100%;
    font-size: 14px;
    color: #5F6368;
    margin: 0;
    line-height: 20px;
}

/* Your Extensions cards - same style as Pro extensions */
.ipb_installed_popup .ipb_grid.ipb_install {
    flex: 0 0 calc(25% - 15px);
}

.ipb_installed_popup .ipb_grid.ipb_install .thumb {
    width: 64px;
    height: 64px;
    background: #1A73E8 !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipb_installed_popup .ipb_grid.ipb_install .thumb i {
    font-size: 28px !important;
    color: white !important;
    display: inline-block !important;
}

.ipb_installed_popup .ipb_grid.ipb_install .thumb i::before {
    color: white !important;
}

.ipb_installed_popup .ipb_grid.ipb_install .thumb img {
    display: none !important;
}

/* Responsive adjustments for Add New page */
@media (min-width: 1366px) and (max-width: 1920px) {
    .ipb_installed_popup {
        gap: 15px;
    }

    .ipb_installed_popup .ipb_grid {
        flex: 0 0 calc(25% - 12px);
        padding: 20px;
        gap: 14px;
    }

    .ipd_content h3 {
        font-size: 17px;
        line-height: 22px;
    }

    .ipd_content p {
        font-size: 13px;
        line-height: 18px;
    }

    a.pro_btn {
        font-size: 13px;
        padding: 8px 20px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ipb_installed_popup {
        gap: 15px;
    }

    .ipb_installed_popup .ipb_grid {
        flex: 0 0 calc(50% - 10px);
        padding: 20px;
        gap: 14px;
    }
}
