/* Floating Widget Button */
#updatepress-floating-widget {
    position: fixed !important;
    bottom: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(66, 66, 66, 0.3);
    z-index: 999999 !important;
    font-size: 24px;
    transition: all 0.3s ease-in-out;
    background-color: #ffffff00;
    color: rgba(255, 255, 255, 0);
}

/* Position-specific styles */
#updatepress-floating-widget[data-position="left"] {
    left: 20px;
    right: auto;
}

#updatepress-floating-widget[data-position="right"] {
    right: 20px;
    left: auto;
}

#updatepress-floating-widget:hover {
    transform: scale(1.1);
}

/* Tag styles */
.updatepress-tag {
    position: absolute !important;
    top: -10px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 999999 !important;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Position-specific tag styles */
#updatepress-floating-widget[data-position="left"] .updatepress-tag {
    right: -10px;
    left: auto;
}

#updatepress-floating-widget[data-position="right"] .updatepress-tag {
    left: -10px;
    right: auto;
}

/* Count badge styles */
#updatepress-count-badge {
    position: absolute !important;
    top: -5px;
    right: -5px;
    background: #d33;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    z-index: 999999 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Sidebar (Kept original outer styling) */
#updatepress-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    width: 350px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 8px rgba(87, 87, 87, 0.2);
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 9999;
    border-left: 3px solid #fdfdfd;
}

#updatepress-sidebar.active {
    right: 0;
}

/* Sidebar Header */
#updatepress-sidebar-header {
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 20px;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#updatepress-close {
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#updatepress-close:hover {
    color: #ff4444;
}

/* Sidebar Content */
#updatepress-content {
    padding: 4px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#updatepress-content::-webkit-scrollbar {
    width: 6px;
}

#updatepress-content::-webkit-scrollbar-track {
    background: transparent;
}

#updatepress-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Single Update View */
#updatepress-single-content {
    padding: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    background: #ffffff;
    position: relative;
}

.updatepress-single-back-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #eaeaea;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Update Items */
.updatepress-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 16px;
    transition: all 0.2s ease;
    border: 1px solid #eaeaea;
}

.updatepress-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #2196F3;
}

.updatepress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.updatepress-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.updatepress-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.updatepress-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.4;
    margin: 0;
    transition: color 0.2s ease;
}

.updatepress-title:hover {
    color: #2196F3;
}

.updatepress-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Tags styling */
.updatepress-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.updatepress-tag-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Back Button (Centered with New Color) */
#updatepress-back {
    position: relative;
    top: auto;
    left: auto;
    background: #ffffff;
    border: 1px solid #eaeaea;
    padding: 6px 12px;
    border-radius: 6px;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: fit-content;
}

#updatepress-back:hover {
    background: #f8f8f8;
    transform: translateX(-2px);
    border-color: #2196F3;
    color: #2196F3;
}

#updatepress-back::before {
    content: "←";
    font-size: 14px;
    line-height: 1;
    position: relative;
    top: -1px;
}

#updatepress-single-view {
    padding: 24px;
}

.updatepress-single-header {
    margin-bottom: 20px;
}

.updatepress-single-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.updatepress-single-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 6px;
}

.updatepress-single-date svg {
    color: #666;
}

.updatepress-single-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.updatepress-single-divider {
    height: 1px;
    background: #eaeaea;
    margin: 20px 0;
}

.updatepress-single-content {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

/* Paragraphs */
.updatepress-single-content p {
    margin: 0 0 16px;
}

.updatepress-single-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.updatepress-single-content ul,
.updatepress-single-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.updatepress-single-content ul {
    list-style-type: disc;
}

.updatepress-single-content ol {
    list-style-type: decimal;
}

.updatepress-single-content ul ul,
.updatepress-single-content ol ul {
    list-style-type: circle;
    margin-bottom: 0;
    margin-top: 8px;
}

.updatepress-single-content ul ol,
.updatepress-single-content ol ol {
    list-style-type: lower-alpha;
    margin-bottom: 0;
    margin-top: 8px;
}

.updatepress-single-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.updatepress-single-content li:last-child {
    margin-bottom: 0;
}

/* Headings */
.updatepress-single-content h1,
.updatepress-single-content h2,
.updatepress-single-content h3,
.updatepress-single-content h4,
.updatepress-single-content h5,
.updatepress-single-content h6 {
    color: #1a1a1a;
    margin: 24px 0 16px;
    line-height: 1.3;
    font-weight: 600;
}

.updatepress-single-content h1 {
    font-size: 20px;
}

.updatepress-single-content h2 {
    font-size: 18px;
}

.updatepress-single-content h3 {
    font-size: 16px;
}

.updatepress-single-content h4,
.updatepress-single-content h5,
.updatepress-single-content h6 {
    font-size: 14px;
}

/* Links */
.updatepress-single-content a {
    color: #2196F3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.updatepress-single-content a:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* Blockquotes */
.updatepress-single-content blockquote {
    margin: 16px 0;
    padding: 12px 20px;
    border-left: 4px solid #2196F3;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

.updatepress-single-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.updatepress-single-content pre,
.updatepress-single-content code {
    background: #f5f6f7;
    border-radius: 4px;
    font-family: monospace;
}

.updatepress-single-content pre {
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.updatepress-single-content code {
    padding: 2px 6px;
    font-size: 13px;
}

/* Tables */
.updatepress-single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.updatepress-single-content th,
.updatepress-single-content td {
    padding: 8px 12px;
    border: 1px solid #eaeaea;
    text-align: left;
}

.updatepress-single-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Images */
.updatepress-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 16px 0;
}

/* Footer */
#updatepress-footer {
    background: #f5f5f5;
    border-top: 1px solid #eaeaea;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

#updatepress-footer a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

#updatepress-footer a:hover {
    text-decoration: underline;
}

/* Dropdown Styling */
#updatepress-category-filter {
    background: #f5f5f5;
    border: 1px solid #eaeaea;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    max-width: 200px;
}

#updatepress-category-filter:hover,
#updatepress-category-filter:focus {
    border-color: #2196F3;
    background: #ffffff;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    #updatepress-floating-widget {
        bottom: 15px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    #updatepress-floating-widget[data-position="left"] {
        left: 15px;
    }

    #updatepress-floating-widget[data-position="right"] {
        right: 15px;
    }

    #updatepress-sidebar {
        width: 100%;
        right: -100%;
    }

    #updatepress-sidebar.active {
        right: 0;
    }

    .updatepress-item {
        margin: 8px 12px;
        padding: 12px;
    }

    .updatepress-title {
        font-size: 15px;
    }

    .updatepress-excerpt {
        font-size: 13px;
    }

    #updatepress-single-view {
        padding: 20px 16px;
    }

    .updatepress-single-title {
        font-size: 16px;
    }

    .updatepress-single-content {
        font-size: 13px;
    }

    .updatepress-single-content h1 {
        font-size: 18px;
    }

    .updatepress-single-content h2 {
        font-size: 16px;
    }

    .updatepress-single-content h3 {
        font-size: 15px;
    }

    .updatepress-single-content h4,
    .updatepress-single-content h5,
    .updatepress-single-content h6 {
        font-size: 13px;
    }

    .updatepress-single-content ul,
    .updatepress-single-content ol {
        padding-left: 20px;
    }

    .updatepress-single-content blockquote {
        padding: 10px 16px;
    }

    #updatepress-back {
        padding: 4px 10px;
        font-size: 11px;
    }

    #updatepress-back::before {
        font-size: 13px;
    }

    .updatepress-single-back-header {
        padding: 12px 16px;
    }
}

/* Update the existing tags styling for single view */
.updatepress-single-view .updatepress-tags {
    margin: 0;
}

.updatepress-single-view .updatepress-tag-label {
    font-size: 11px;
    padding: 4px 10px;
}

/* Analytics and Feedback Styles */
.updatepress-analytics {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
}

.updatepress-read-count,
.updatepress-likes,
.updatepress-dislikes,
.updatepress-stat {
    color: #666;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: #f8f9fa;
    border-radius: 12px;
    font-weight: 500;
}

.updatepress-feedback-section {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
}

.updatepress-analytics-display {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
}

.updatepress-feedback-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.updatepress-feedback-btn {
    background: #ffffff;
    border: 2px solid #eaeaea;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #666;
}

.updatepress-feedback-btn:hover {
    border-color: #2196F3;
    background: #f8f9ff;
    color: #2196F3;
    transform: translateY(-1px);
}

.updatepress-feedback-btn.like-btn:hover {
    border-color: #4CAF50;
    background: #f8fff8;
    color: #4CAF50;
}

.updatepress-feedback-btn.dislike-btn:hover {
    border-color: #f44336;
    background: #fff8f8;
    color: #f44336;
}

.updatepress-feedback-btn.active.like-btn {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.updatepress-feedback-btn.active.dislike-btn {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.updatepress-feedback-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.updatepress-feedback-message {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive for Analytics */
@media (max-width: 600px) {
    .updatepress-analytics {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .updatepress-analytics-display {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .updatepress-feedback-buttons {
        gap: 8px;
        flex-direction: column;
    }
    
    .updatepress-feedback-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .updatepress-stat {
        font-size: 10px;
        padding: 2px 4px;
    }
}
