/* Wikipedia Side Panel Styles */

#wiki-side-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100%;
    background: #000000bf;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out, width 0.3s ease-in-out;

    max-width: 100vw;
}

#wiki-side-panel.open.full {
    width: 100%;
}

#wiki-side-panel.open {
    right: 0;
}

#wiki-side-panel .panel-header {
    padding: 15px;
    /* border-bottom: 1px solid #ccc; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* background: #f5f5f5; */
}

#wiki-title {
    font-weight: bold;
    font-size: 18px;
    flex: 1;
    color: #fff;
}

#wiki-side-panel .close-btn {
    cursor: pointer;
    padding-left: 1em;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 20px;
    font-weight: bold;
}

#wiki-side-panel .close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#wiki-content {
    flex: 1;
    padding: 1em;
    overflow: auto;
    font-family: Georgia, serif;
    font-weight: 100;
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    background: #00000050;
}

#wiki-content .loading-message {
    text-align: center;
    padding: 50px;
    height: calc(100% - (30px + 6em));
    display: flex;
    justify-content: center;
    align-items: center;
}

#wiki-content .error-message {
    text-align: center;
    padding: 50px;
    color: #999;
}

#wiki-content .error-message a {
    color: #0066cc;
}

#wiki-content a {
    color: #0066cc;
    text-decoration: none;
}

#wiki-content a:hover {
    text-decoration: underline;
}

#wiki-content .image img{
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0.25em;
}

#wiki-content iframe { 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: #fff;
    overflow-x: hidden; 
    overflow-y: auto;
}

.panel-footer {
    padding: 15px;
    text-align: center;
}

.read-full-btn {
    color: #fff;
    background: transparent;
    text-decoration: none;
    border: 1px solid #fff;
    border-radius: 1em;
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.read-full-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* The entire scrollbar */
#wiki-content::-webkit-scrollbar {
    width: 2px;      /* Width of vertical scrollbar */
    height: 8px;     /* Height of horizontal scrollbar */
}

/* The scrollbar track (background) */
#wiki-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1); /* Subtle background */
    border-radius: 10px;
}

/* The draggable scrollbar handle */
#wiki-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 1);      /* Semi-transparent white */
    border-radius: 10px;
}

/* Handle hover effect */
#wiki-content::-webkit-scrollbar-thumb:hover {
    background: #fff;
}