/* Enhanced Sidebar Widgets Styles */

/* Widget Header with Icons */
.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.widget-header svg {
    color: #3b82f6;
    flex-shrink: 0;
}

/* Loading States */
.widget-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.widget-loading p {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Popular Widget */
.popular-widget .sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
}

/* Weather Widget */
.weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.weather-widget .widget-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.weather-widget .widget-header svg {
    color: white;
}

.weather-widget .sidebar-title {
    color: white;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.weather-icon {
    font-size: 4rem;
    line-height: 1;
}

.weather-temp {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.temp-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.temp-unit {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.weather-details {
    text-align: center;
    margin-bottom: 1rem;
}

.weather-location {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.weather-condition {
    opacity: 0.9;
    font-size: 0.875rem;
}

.weather-extra {
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-extra-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Newsletter Widget - Enhanced */
.newsletter-widget.gradient-bg {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-align: center;
    border: none;
}

.newsletter-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.newsletter-widget .sidebar-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-widget .newsletter-description {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.newsletter-btn {
    padding: 0.875rem 1.5rem;
    background: white;
    color: #f5576c;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.newsletter-btn svg {
    transition: transform 0.3s ease;
}

.newsletter-btn:hover svg {
    transform: translateX(4px);
}

.newsletter-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

/* Poll Widget */
.poll-widget {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

.poll-question {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 1.25rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.poll-option {
    cursor: pointer;
    display: block;
}

.poll-option input[type="radio"] {
    display: none;
}

.poll-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.poll-option:hover .poll-label {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.poll-option input[type="radio"]:checked + .poll-label {
    border-color: #3b82f6;
    background: #dbeafe;
}

.poll-text {
    font-weight: 500;
    color: #334155;
}

.poll-percentage {
    font-weight: 700;
    color: #3b82f6;
    font-size: 0.875rem;
}

.poll-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.poll-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width 0.5s ease;
}

.poll-vote-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.poll-vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.poll-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.poll-votes-count {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
}

.poll-votes-count span {
    font-weight: 600;
    color: #3b82f6;
}

/* Social Media Widget */
.social-widget {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-link svg {
    flex-shrink: 0;
}

.social-link span:first-of-type {
    flex: 1;
}

.follower-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.social-link.facebook {
    border-color: #1877f2;
}

.social-link.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-link.facebook:hover .follower-count {
    color: rgba(255, 255, 255, 0.9);
}

.social-link.twitter {
    border-color: #1da1f2;
}

.social-link.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.social-link.twitter:hover .follower-count {
    color: rgba(255, 255, 255, 0.9);
}

.social-link.instagram {
    border-color: #e1306c;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-color: #e1306c;
}

.social-link.instagram:hover .follower-count {
    color: rgba(255, 255, 255, 0.9);
}

.social-link.youtube {
    border-color: #ff0000;
}

.social-link.youtube:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.social-link.youtube:hover .follower-count {
    color: rgba(255, 255, 255, 0.9);
}

/* Advertisement Widget */
.ad-widget {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
}

.ad-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 0.5rem;
}

.ad-space {
    aspect-ratio: 300/250;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e1;
}

.ad-placeholder svg {
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.ad-placeholder p {
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.4;
}

/* Tags Widget */
.tags-widget {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: none;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #3b82f6;
    color: white;
}

.tag-count {
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: #f1f5f9;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.tag-item:hover .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Categories Widget Enhanced */
.categories-widget {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: white;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #3b82f6;
    color: white;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    font-size: 1.25rem;
}

.category-count {
    padding: 0.25rem 0.625rem;
    background: #f1f5f9;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.category-item:hover .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .sidebar {
        display: none;
    }
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Hover effects and animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-widget {
    animation: fadeIn 0.5s ease forwards;
}

.sidebar-widget:nth-child(1) { animation-delay: 0.1s; }
.sidebar-widget:nth-child(2) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(3) { animation-delay: 0.3s; }
.sidebar-widget:nth-child(4) { animation-delay: 0.4s; }
.sidebar-widget:nth-child(5) { animation-delay: 0.5s; }
.sidebar-widget:nth-child(6) { animation-delay: 0.6s; }
.sidebar-widget:nth-child(7) { animation-delay: 0.7s; }
.sidebar-widget:nth-child(8) { animation-delay: 0.8s; }

/* Sticky sidebar */
@media (min-width: 1024px) {
    .sidebar {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f1f5f9;
    }

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}