/**
 * SR Modern Theme - Widget Styles
 *
 * @package SR_Modern_Theme
 * @since 1.0
 */

/* ==========================================================================
   Widget Base Styles
   ========================================================================== */

.widget {
    margin-bottom: var(--sr-space-8);
}

.widget-title {
    font-size: var(--sr-text-lg);
    font-weight: var(--sr-font-semibold);
    margin-bottom: var(--sr-space-4);
    padding-bottom: var(--sr-space-3);
    border-bottom: 2px solid var(--sr-primary);
}

/* ==========================================================================
   About Widget
   ========================================================================== */

.sr-about-widget {
    text-align: center;
    padding: var(--sr-space-6);
    background-color: var(--sr-surface);
    border-radius: var(--sr-radius-xl);
}

.sr-about-widget__image {
    margin-bottom: var(--sr-space-4);
}

.sr-about-widget__image img {
    width: 120px;
    height: 120px;
    border-radius: var(--sr-radius-full);
    object-fit: cover;
    border: 4px solid var(--sr-white);
    box-shadow: var(--sr-shadow-lg);
}

.sr-about-widget__title {
    font-size: var(--sr-text-xl);
    font-weight: var(--sr-font-bold);
    margin-bottom: var(--sr-space-2);
}

.sr-about-widget__description {
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm);
    line-height: var(--sr-leading-relaxed);
    margin-bottom: var(--sr-space-4);
}

.sr-about-widget__button {
    display: inline-block;
    padding: var(--sr-space-2) var(--sr-space-5);
    background-color: var(--sr-primary);
    color: var(--sr-white);
    border-radius: var(--sr-radius-full);
    font-size: var(--sr-text-sm);
    font-weight: var(--sr-font-medium);
    transition: all var(--sr-transition-fast);
}

.sr-about-widget__button:hover {
    background-color: var(--sr-secondary);
    transform: translateY(-2px);
}

.sr-about-widget__social {
    margin-top: var(--sr-space-4);
    padding-top: var(--sr-space-4);
    border-top: 1px solid var(--sr-border);
}

.sr-about-widget__social .sr-social-links {
    justify-content: center;
}

/* ==========================================================================
   Recent Posts Widget
   ========================================================================== */

.sr-recent-posts__item {
    display: flex;
    gap: var(--sr-space-3);
    padding: var(--sr-space-3) 0;
    border-bottom: 1px solid var(--sr-border);
}

.sr-recent-posts__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sr-recent-posts__item:first-child {
    padding-top: 0;
}

.sr-recent-posts__thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--sr-radius-md);
    overflow: hidden;
}

.sr-recent-posts__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-recent-posts__content {
    flex: 1;
    min-width: 0;
}

.sr-recent-posts__category {
    margin-bottom: var(--sr-space-1);
}

.sr-recent-posts__category a {
    font-size: var(--sr-text-xs);
    font-weight: var(--sr-font-medium);
    text-transform: uppercase;
    color: var(--sr-primary);
}

.sr-recent-posts__title {
    font-size: var(--sr-text-sm);
    font-weight: var(--sr-font-medium);
    line-height: 1.4;
    margin-bottom: var(--sr-space-1);
}

.sr-recent-posts__title a {
    color: var(--sr-text-primary);
    transition: color var(--sr-transition-fast);
}

.sr-recent-posts__title a:hover {
    color: var(--sr-primary);
}

.sr-recent-posts__date {
    font-size: var(--sr-text-xs);
    color: var(--sr-text-muted);
}

/* ==========================================================================
   Popular Posts Widget
   ========================================================================== */

.sr-popular-posts__item {
    display: flex;
    align-items: flex-start;
    gap: var(--sr-space-3);
    padding: var(--sr-space-3) 0;
    border-bottom: 1px solid var(--sr-border);
}

.sr-popular-posts__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sr-popular-posts__item:first-child {
    padding-top: 0;
}

.sr-popular-posts__number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--sr-primary), var(--sr-secondary));
    border-radius: var(--sr-radius-md);
    color: var(--sr-white);
    font-size: var(--sr-text-sm);
    font-weight: var(--sr-font-bold);
}

.sr-popular-posts__thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--sr-radius-md);
    overflow: hidden;
}

.sr-popular-posts__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-popular-posts__content {
    flex: 1;
    min-width: 0;
}

.sr-popular-posts__title {
    font-size: var(--sr-text-sm);
    font-weight: var(--sr-font-medium);
    line-height: 1.4;
    margin-bottom: var(--sr-space-1);
}

.sr-popular-posts__title a {
    color: var(--sr-text-primary);
    transition: color var(--sr-transition-fast);
}

.sr-popular-posts__title a:hover {
    color: var(--sr-primary);
}

.sr-popular-posts__meta {
    display: flex;
    align-items: center;
    gap: var(--sr-space-3);
}

.sr-popular-posts__views,
.sr-popular-posts__comments {
    display: flex;
    align-items: center;
    gap: var(--sr-space-1);
    font-size: var(--sr-text-xs);
    color: var(--sr-text-muted);
}

.sr-popular-posts__views svg,
.sr-popular-posts__comments svg {
    color: var(--sr-text-muted);
}

/* ==========================================================================
   Social Links Widget
   ========================================================================== */

.sr-social-widget__description {
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm);
    margin-bottom: var(--sr-space-4);
}

.sr-social-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sr-social-list__item {
    margin-bottom: var(--sr-space-2);
}

.sr-social-list__item a {
    display: flex;
    align-items: center;
    gap: var(--sr-space-3);
    padding: var(--sr-space-3);
    background-color: var(--sr-surface);
    border-radius: var(--sr-radius-md);
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm);
    transition: all var(--sr-transition-fast);
}

.sr-social-list__item a:hover {
    background-color: var(--sr-primary);
    color: var(--sr-white);
}

.sr-social-list__item a svg {
    flex-shrink: 0;
}

/* Platform-specific hover colors */
.sr-social-list__item--facebook a:hover {
    background-color: #1877f2;
}

.sr-social-list__item--twitter a:hover {
    background-color: #000;
}

.sr-social-list__item--instagram a:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.sr-social-list__item--linkedin a:hover {
    background-color: #0a66c2;
}

.sr-social-list__item--youtube a:hover {
    background-color: #ff0000;
}

.sr-social-list__item--pinterest a:hover {
    background-color: #e60023;
}

.sr-social-list__item--tiktok a:hover {
    background-color: #000;
}

.sr-social-list__item--telegram a:hover {
    background-color: #0088cc;
}

.sr-social-list__item--whatsapp a:hover {
    background-color: #25d366;
}

/* ==========================================================================
   Newsletter Widget
   ========================================================================== */

.sr-newsletter {
    padding: var(--sr-space-6);
    background-color: var(--sr-surface);
    border-radius: var(--sr-radius-xl);
}

.sr-newsletter--boxed {
    background: linear-gradient(135deg, var(--sr-primary), var(--sr-secondary));
    color: var(--sr-white);
    text-align: center;
}

.sr-newsletter--boxed .sr-newsletter__title {
    color: var(--sr-white);
}

.sr-newsletter--boxed .sr-newsletter__description {
    color: rgba(255, 255, 255, 0.9);
}

.sr-newsletter--minimal {
    background: transparent;
    padding: 0;
}

.sr-newsletter__icon {
    margin-bottom: var(--sr-space-4);
}

.sr-newsletter__icon svg {
    opacity: 0.9;
}

.sr-newsletter__title {
    font-size: var(--sr-text-lg);
    font-weight: var(--sr-font-bold);
    margin-bottom: var(--sr-space-2);
}

.sr-newsletter__description {
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm);
    margin-bottom: var(--sr-space-4);
}

.sr-newsletter__form {
    margin-top: var(--sr-space-4);
}

.sr-newsletter__input-group {
    display: flex;
    gap: var(--sr-space-2);
}

.sr-newsletter__input {
    flex: 1;
    padding: var(--sr-space-3) var(--sr-space-4);
    background-color: var(--sr-white);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-md);
    font-size: var(--sr-text-sm);
    color: var(--sr-text-primary);
}

.sr-newsletter__input:focus {
    outline: none;
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sr-newsletter--boxed .sr-newsletter__input {
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
}

.sr-newsletter__button {
    padding: var(--sr-space-3) var(--sr-space-5);
    background-color: var(--sr-primary);
    border: none;
    border-radius: var(--sr-radius-md);
    color: var(--sr-white);
    font-size: var(--sr-text-sm);
    font-weight: var(--sr-font-medium);
    cursor: pointer;
    transition: all var(--sr-transition-fast);
    white-space: nowrap;
}

.sr-newsletter__button:hover {
    background-color: var(--sr-secondary);
    transform: translateY(-1px);
}

.sr-newsletter--boxed .sr-newsletter__button {
    background-color: var(--sr-white);
    color: var(--sr-primary);
}

.sr-newsletter--boxed .sr-newsletter__button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.sr-newsletter__privacy {
    margin-top: var(--sr-space-3);
    font-size: var(--sr-text-xs);
    color: var(--sr-text-muted);
}

.sr-newsletter--boxed .sr-newsletter__privacy {
    color: rgba(255, 255, 255, 0.7);
}

.sr-newsletter__note {
    font-size: var(--sr-text-sm);
    color: var(--sr-text-muted);
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .sr-newsletter__input-group {
        flex-direction: column;
    }

    .sr-newsletter__button {
        width: 100%;
    }
}

/* ==========================================================================
   Categories Widget (Enhancement)
   ========================================================================== */

.widget_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget_categories li {
    margin-bottom: var(--sr-space-2);
}

.widget_categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sr-space-2) var(--sr-space-3);
    background-color: var(--sr-surface);
    border-radius: var(--sr-radius-md);
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm);
    transition: all var(--sr-transition-fast);
}

.widget_categories a:hover {
    background-color: var(--sr-primary);
    color: var(--sr-white);
}

.widget_categories a::after {
    content: attr(data-count);
    padding: var(--sr-space-1) var(--sr-space-2);
    background-color: var(--sr-surface-hover);
    border-radius: var(--sr-radius-sm);
    font-size: var(--sr-text-xs);
}

.widget_categories a:hover::after {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Tag Cloud Widget (Enhancement)
   ========================================================================== */

.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sr-space-2);
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: var(--sr-space-1) var(--sr-space-3);
    background-color: var(--sr-surface);
    border-radius: var(--sr-radius-full);
    color: var(--sr-text-secondary);
    font-size: var(--sr-text-sm) !important;
    transition: all var(--sr-transition-fast);
}

.widget_tag_cloud .tagcloud a:hover {
    background-color: var(--sr-primary);
    color: var(--sr-white);
}

/* ==========================================================================
   Search Widget (Enhancement)
   ========================================================================== */

.widget_search .search-form {
    display: flex;
}

.widget_search .search-field {
    flex: 1;
    padding: var(--sr-space-3) var(--sr-space-4);
    background-color: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-md) 0 0 var(--sr-radius-md);
    font-size: var(--sr-text-sm);
}

.widget_search .search-field:focus {
    outline: none;
    border-color: var(--sr-primary);
}

.widget_search .search-submit {
    padding: var(--sr-space-3) var(--sr-space-4);
    background-color: var(--sr-primary);
    border: none;
    border-radius: 0 var(--sr-radius-md) var(--sr-radius-md) 0;
    color: var(--sr-white);
    cursor: pointer;
    transition: background-color var(--sr-transition-fast);
}

.widget_search .search-submit:hover {
    background-color: var(--sr-secondary);
}