/* =============================================================
   sidebar-widgets.css
   Sidebar column and all widget styles:
     - Generic widget wrapper
     - QL Newsletter widget
     - QL Recruitment Banner widget
     - WP built-in Recent Posts widget
   ============================================================= */

/* ---- Generic widget container ---- */
.ql-sidebar-widget {
    border-radius: 12px;
    overflow: hidden;
}

/* ---- Widget title (for built-in WP widgets) ---- */
.ql-widget-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #1a3c6e;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a3c6e;
}

/* ===========================================================
   Newsletter Widget — theo Figma
   bg #EAF0FF | border rgba(85,87,159,0.2) | radius 8px | padding 32px | gap 8px
   =========================================================== */
.ql-sidebar-widget.ql-newsletter-widget {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: #EAF0FF;
    background-clip: padding-box;
    border: 1px solid rgba(85, 87, 159, 0.2);
    border-radius: 8px;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

/* Icon — không có circle, chỉ hiện icon đơn giản */
.ql-newsletter-icon {
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.ql-newsletter-icon svg {
    width: 24px;
    height: 24px;
    stroke: #2D2E74;
    fill: none;
}

.ql-newsletter-title {
    font-size: 20px;
    font-weight: 700;
    color: #2D2E74;
    margin: 5px 0 5px;
    line-height: 1.4;
}

.ql-newsletter-desc {
    font-size: 12px;
    font-weight: 400;
    color: #45474B;
    line-height: 1.4;
    margin: 0 0 10px;
}

.ql-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px !important;
    width: 100%;
    margin: 0 !important;
}

.ql-newsletter-email,
.ql-newsletter-email:focus,
.ql-newsletter-email:active {
    width: 100% !important;
    padding: 6px 14px !important;
    height: 42px !important;
    border: 1px solid #D5D6DC !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    background: #FFFFFF !important;
    color: #45474B !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    transition: border-color 0.2s;
    margin-bottom: 0 !important;
}

.ql-newsletter-email::placeholder {
    color: #9EA0A5;
}

.ql-newsletter-email:focus {
    border-color: #2D2E74 !important;
}

.ql-newsletter-btn {
    width: 100%;
    height: 42px;
    padding: 6px 14px;
    background: #2D2E74;
    color: #FFFFFF !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    transition: background 0.2s, transform 0.1s;
    margin: 0px !important;
}

.ql-newsletter-btn:hover,
.ql-newsletter-btn:focus,
.ql-newsletter-btn:active {
    background: #0f2a52 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    outline: none !important;
}

.ql-newsletter-success {
    font-size: 14px;
    color: #2d7a3a;
    font-weight: 600;
    margin: 0;
    padding: 10px 0;
}

/* ===========================================================
   Recruitment Banner Widget
   =========================================================== */
.ql-sidebar-widget.widget_ql-recruitment-banner-widget {
    border-radius: 0;
}
.ql-recruitment-banner {
    overflow: hidden;
    line-height: 0;
    /* remove inline-block gap */
}

.ql-banner-link {
    display: block;
    overflow: hidden;
    line-height: 0;
}

.ql-banner-img {
    /* Width always 100% of sidebar column — matches other widgets */
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ql-banner-link:hover .ql-banner-img {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.ql-banner-placeholder {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
    line-height: 1.6;
    border: 2px dashed #cbd5e0;
}

/* ===========================================================
   WP Built-in Recent Posts (widget_recent_entries)
   =========================================================== */
.ql-sidebar-widget.widget_recent_entries {
    background: transparent;
    padding: 0;
}

/* Remove WP default list styles */
.widget_recent_entries ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.widget_recent_entries ul li {
    padding: 6px 0;
    border: none;
}

.widget_recent_entries ul li:first-child {
    padding-top: 0;
}

.widget_recent_entries ul li:last-child {
    padding-bottom: 0;
}

.widget_recent_entries ul li a {
    font-size: 13px;
    font-weight: 600;
    color: #222222 !important;
    text-decoration: none !important;
    line-height: 1.55;
    display: block;
    padding-left: 16px;
    position: relative;
    transition: color 0.2s;
}

.widget_recent_entries ul li a::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
    line-height: 1.3;
    color: #1a3c6e;
    font-weight: 700;
}

.widget_recent_entries ul li a:hover,
.widget_recent_entries ul li a:focus,
.widget_recent_entries ul li a:active {
    color: #1a3c6e !important;
    text-decoration: none !important;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 768px) {
    .ql-sidebar-widget.ql-newsletter-widget {
        padding: 40px 16px;
    }

    .ql-newsletter-title {
        margin: 12px 0;
    }

    .ql-newsletter-desc {
        margin-bottom: 16px;
    }

    .ql-widget-title {
        font-size: 18px;
        font-weight: 700;
        text-transform: uppercase;
        color: #2D2E74;
        margin: 0 0 0px;
        padding-bottom: 16px;
        border-bottom: 1px solid #E4E5E7;
        letter-spacing: normal;
    }

    .ql-sidebar-widget.widget_recent_entries {
        background: #FFFFFF;
        padding: 24px;
        border: 1px solid #E4E5E7;
        border-radius: 12px;
    }

    .widget_recent_entries ul li {
        padding: 16px 0;
        border-bottom: 1px solid #E4E5E7;
    }

    .widget_recent_entries ul li:first-child {
        padding-top: 16px;
    }

    .widget_recent_entries ul li:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .widget_recent_entries ul li a {
        font-size: 15px;
        font-weight: 600;
        color: #111111 !important;
        line-height: 1.5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 0;
    }

    .widget_recent_entries ul li a::before {
        display: none;
    }

    .widget_recent_entries ul li a:hover,
    .widget_recent_entries ul li a:focus,
    .widget_recent_entries ul li a:active {
        color: #2D2E74 !important;
    }
}
