/* Hide version selector */
.version-switch {
    display: none !important;
}

/* ---------------------------------------------------------------------------------------------- */
/* description: freenove-docs QR code style

 * author: vegetable-syc

 * date: 2025/04/28
 */

 /* Admonition title centering style */
.admonition-center.admonition p:not(.admonition-title) {
    text-align: left;
}

.download-grid {
    display: flex;             /* 1. Enable Flexbox layout */
    justify-content: center;   /* 2. Horizontally center the items in the container */
    align-items: flex-start;   /* Align items to the top */
    flex-wrap: wrap;           /* 3. Allow items to wrap to the next line on small screens */
    gap: 40px;                 /* 4. Add space between the download items */
    margin-top: 20px;          /* Add some space from the admonition title */
}

/* Each individual download item (QR code + button) */
.download-item {
    display: flex;             /* 5. Also a flex container! */
    flex-direction: column;    /* 6. Stack children (image and link) vertically */
    align-items: center;       /* 7. Horizontally center the children */
    gap: 15px;                 /* 8. Add space between the QR code and the download button */
    text-align: center;
}

/* Optional: Add a little breathing room to the images inside the item */
.download-item img {
    max-width: 100%;
    height: auto;
}

.download-grid.multi-items {
    justify-content: space-around;
}

.download-item a::after {
    display: none !important;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About Table

 * author: vegetable-syc

 * date: 2025/05/27
 */

.text-center th,
.text-center td {
    text-align: center;
    vertical-align: middle;
}

.table-line th,
.table-line td {
    border: 1px solid #000000 !important;
}

/* Orange and white zebra-striped table */
table.freenove-ow {
  border-collapse: collapse;            /* Collapse table borders (no gaps) */
  width: auto;
  margin: auto auto;
  /* border-radius: 8px; */
  overflow: hidden;
}

table.freenove-ow td, 
table.freenove-ow th {
  padding: 14px 16px !important;        /* Set cell padding top/bottom left/right */
  border: 1px solid #000000 !important;
}

/* Table row settings */
table.freenove-ow tbody tr:nth-child(even) {
  background-color: #f7e0c5;          /* Even row background color */
  font-family: "DengXian";              /* Set font to DengXian */
  font-size: 20px;
  font-weight: bold;                    /* Set font weight to bold */
}

table.freenove-ow tbody tr:nth-child(odd) {
  background-color: #ffffff;          /* Odd row background color */
  font-family: "DengXian";              /* Set font to DengXian */
  font-size: 20px;
  font-weight: bold;                    /* Set font weight to bold */
}

/* Table header settings */
table.freenove-ow thead tr:nth-child(odd) {
  background-color: #ff7b00;          /* Table header background color */
  color: #ffffff;                     /* Table header font color */
  font-weight: bolder;
  font-family: "DengXian";              /* Set font to DengXian */
  font-size: 20px;
}

/* DIY Zebra */
.zebra tbody tr:nth-child(odd) {
  background-color: var(--tr-odd-row-color, #ffffff); 
  font-weight: bold;
  font-size: 20px;
}

.zebra tbody tr:nth-child(even) {
  background-color: var(--tr-even-row-color, #f7e0c5);
  font-weight: bold;
  font-size: 20px;
}

.zebra thead tr:nth-child(odd) {
  background-color: var(--th-even-row-color, #ff7b00);
  color: var(--text-color, #ffffff);
  font-weight: bolder;
  font-size: 25px;
}

.zebra td,
.zebra th{
    border: 1px solid var(--border-color, #000000) !important;
    padding: 14px 16px !important;
}

.zebra-theme-pink {
  --tr-odd-row-color: #e3f2fd;  
  --tr-even-row-color: #ff4cae42;
  --th-even-row-color: #ff4caf;
  --text-color: #ffffff;
  border-color: #000000
}

.zebra-theme-blue {
  --tr-odd-row-color: #e3f2fd;  
  --tr-even-row-color: #bbdefb;
  --th-even-row-color: #0066ff;
  --text-color: #ffffff;
  border-color: #000000
}

.zebra-theme-green {
  --tr-odd-row-color: #e8f5e9; 
  --tr-even-row-color: #c8e6c9; 
  --th-even-row-color: #00ff00;
  --text-color: #ffffff;
  --border-color: #000000;
}

/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About Heading

 * author: vegetable-syc

 * date: 2025/05/28
 */

/* Heading 1 */
h1 {
    color: #ff7b00;
    font-size: 35px;
    font-family: "DengXian";
    font-weight: normal;
    margin-bottom: 30px;
}

/* Heading 2 */
h2 {
    background-color: #ff7b00;
    font-size: 30px;
    font-family: "DengXian";
    color: white;
    width: 100%;
    height: 40px;
    padding: 3px 2px;
    font-weight: normal;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Heading 3 */
h3 {
    color: #ff7b00;
    font-size: 30px;
    font-family: "DengXian";
    font-weight: normal;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Heading 4 */
h4 {
    color: #ff7b00;
    font-size: 20px;
    font-family: "DengXian";
    font-weight: normal;
    margin-top: 20px;
    margin-bottom: 20px;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: Regarding Custom Tags

 * author: vegetable-syc

 * date: 2025/05/28
 */
/* Since the class changes every time, we use keyword matching */

/* Override the icon before the title */
[class^="admonition-"] .admonition-title::before {
    content: "" !important;
}

/* Set title style and icon */
[class^="admonition-"] .admonition-title {
    background-color: #ff7b00 !important;   /* !important keyword forces override */
    background-image: url('../images/freenove_admonition.png');
    background-repeat: no-repeat;
    background-position: left 5px center;
    background-size: 24px 24px;
    padding-left: 30px;                
    line-height: 24px;
    /* border-radius: 3px !important; */
}

/* Set content background color */
div[class^="admonition-"] {
    background-color: #dba7594d !important;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: Document page settings

 * author: vegetable-syc

 * date: 2025/04/28
 */

/* Adjust the width of the main content area */
.wy-nav-content {
    max-width: 1200px !important; /* Default: 800px */
    margin: left;
}

/* Adjust the width of code blocks and tables */
.wy-table-responsive table td,
.wy-table-responsive table th {
    white-space: normal !important;
}

.rst-content .code-block,
.rst-content pre.literal-block {
    max-width: 100%;
    overflow-x: auto;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About The One-Click Copy Button

 * author: vegetable-syc

 * date: 2025/05/30
 */

.copy-button {
    color: #ffffff;
    background-color: #000;
    background: none;
    border: none;
    font-size: 1.2em;
    opacity: 0.6;
    transition: opacity 0.3s;   /* Animation duration after copying */
}
.copy-button:hover {
  opacity: 1;                   /* Opacity when hovering with mouse */
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About function parsing

 * author: vegetable-syc

 * date: 2025/05/30
 */

/* Python */
/* Function Area */
dl.py.function {
    border: 1px solid black;
    border-bottom: none !important;
    color: black;
}

dl.py.function:has(dd:empty) {
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
}

dl.py.function + dl.py.function {
    margin-top: -13px !important;
}

/* Function Signature Area */
dl.py.function dt.sig.sig-object.py {
    all: revert !important; 
    display: inline-block !important;
    padding: 6px 6px !important;
    background-color: #ff7b00 !important;
    border: 1px solid black !important;
    font-weight: bolder !important;
    border-top: none !important;
    border-left: none !important;
    position: relative;
    z-index: 1;
}

/* Empty Function Signature Area */
dl.py.function:has(dd:empty) > dt.sig.sig-object.py {
    border-top: 1px solid black !important;
    border-bottom: 1px solid black !important;
}

/* Bordered Content Area */
dl.py.function dd {
    border-bottom: 1px solid black;
    padding: 10px;
    margin: 0;
}

/* If content area is empty */
dl.py.function dd:empty {
    display: none;
}


/* C */
/* Function Area */
dl.c.function {
    border: 1px solid black;
    border-bottom: none !important;
    color: black;
}

dl.c.function:has(dd:empty) {
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
}

dl.c.function + dl.c.function {
    margin-top: -13px !important;
}

/* Function Signature Area */
dl.c.function dt.sig.sig-object.c {
    all: revert !important; 
    display: inline-block !important;
    padding: 6px 6px !important;
    background-color: #ff7b00 !important;
    border: 1px solid black !important;
    font-weight: bolder !important;
    border-top: none !important;
    border-left: none !important;
    position: relative;
    z-index: 1;
}

/* Empty Function Signature Area */
dl.c.function:has(dd:empty) > dt.sig.sig-object.c {
    border-top: 1px solid black !important;
    border-bottom: 1px solid black !important;
}

/* Bordered Content Area */
dl.c.function dd {
    border-bottom: 1px solid black;
    padding: 10px;
    margin: 0;
}

/* If content area is empty */
dl.c.function dd:empty {
    display: none;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About Online Document Navigation

 * author: vegetable-syc

 * date: 2025/06/05
 */

#fnk-quick-jump {
    position: fixed;    
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    transform-origin: center center;
}

/* Control in minimized state */
#fnk-quick-jump.minimized {
    width: 60px;
    height: 60px;
    cursor: grab;   /* Tooltip: Draggable */
    transform: none;
}

#fnk-quick-jump.minimized .fnk-widget {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: width 0.3s ease,
                left 0.3s ease,
                height 0.3s ease;
}

#fnk-quick-jump.minimized .minimized-icon {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    transition: all 0.3s ease;
}

#fnk-quick-jump.minimized .minimized-icon:hover {
    transform: translateX(-10px) scale(1.15);        
    cursor: pointer;                                 
}

/* Minimized control icon */
.minimized-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: #ff7b00;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    /* transition: all 0.3s ease; */

    z-index: 1001;

    user-select: none;
    -webkit-user-select: none;
}

/* Main panel style design */
.fnk-widget {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 15px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    transform-origin: center;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Control expanded state */
#fnk-quick-jump.expanded {
    width: auto;
    height: auto;
    cursor: default;
}

/* Control expanded state - shows main interface */
#fnk-quick-jump.expanded .fnk-widget {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Control expanded state - minimized icon hidden */
#fnk-quick-jump.expanded .minimized-icon {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

/* Show border shadow on main panel hover */
.fnk-widget:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* Styling between main panel title and logo */
.fnk-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.25);
}

/* Main panel logo styling */
.fnk-logo {
    background-position: center;
    background-repeat: no-repeat;
    width: 50px;
    display: flex;
}

/* Main panel title styling */
.fnk-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 0 20px;
}

/* Recent visits category description */
.fnk-key-hint {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: #6c7a89;
    padding: 10px;
    background: rgba(236, 240, 241, 0.45);
    border-radius: 8px;
    border: 1px dashed rgba(0,0,0,0.08);
}

kbd {
    background-color: #e1e3e5;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 11px;
    border: 1px solid #ccc;
}
/* ---------------------------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------------------------- */
/* description: About the four circular controls

 * author: vegetable-syc

 * date: 2025/06/06
 */

/* Control position settings */
.rtd-controls {
    position: fixed;                /* Fixed positioning */
    left: 1550px;                   /* Offset from left edge of page */
    bottom: -10%;                   /* Offset from bottom of page */
    transform: translateY(-50%);    /* Vertical centering */
    display: flex;                  /* Flex container */
    flex-direction: column;         /* Vertical item arrangement */
    gap: 25px;                      /* Spacing between items */
    z-index: 1000;                  /* Stacking order */
}

/* Control styling */
.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;             /* Rounded corners */
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;            /* Center items vertically */
    justify-content: center;        /* Center items horizontally */
    color: white;
    font-size: 24px;
    cursor: pointer;                /* Display hand cursor pointer */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);/* Easing Animation Effects */
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff7f5f00, #feb47b00, #ff7f5f00);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.control-btn:hover {
    transform: translateX(-10px) scale(1.15);         /* Move left and scale up */
    box-shadow: 0 8px 25px rgba(255, 180, 95, 0);   /* Shadow transparency (should probably be non-zero) */
    border-color: rgba(255, 180, 95, 0);            /* Border transparency (should probably be non-zero) */
}

.control-btn:hover::before {
    opacity: 1; /* Show gradient background */
}

.control-btn:hover .tooltip {
    opacity: 0;     /* Hidden by default */
    transform: translateX(0);
}

.tooltip {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;     /* Hidden by default */
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.tooltip::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
}

/* Set control icon color */
.github-btn { color: #ffffff !important; }
.support { color: #ffffff !important; }
.youtube { color: #f43636 !important; }
.download-btn { color: #66bb6a !important; }

/* Freenove icon style configuration */
.website-btn {
  background-image: url("../images/freenove_logo_tag_icon.png");
  background-color: rgba(0, 0, 0, 0.7);
  background-size: 45%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Freenove icon style configuration */
.language-btn {
  background-image: url("../images/language.png");
  background-color: rgba(0, 0, 0, 0.7);
  background-size: 55%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Freenove icon style configuration */
.support-btn {
  background-image: url("../images/support_icon.png");
  background-color: rgba(0, 0, 0, 0.7);
  background-size: 55%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Mobile device configuration */
@media (min-width: 769px) and (max-width: 1620px) {
    .rtd-controls {
        position: fixed;
        left: auto;   /* Unset the large-screen 'left' value */
        right: 30px;  /* Anchor to the right edge */
    }
}

/* For mobile devices (up to 768px wide) */
@media (max-width: 768px) {
    .rtd-controls {
        flex-direction: row;    /* Arrange buttons horizontally */
        bottom: 20px;
        top: auto;              /* Ensure 'bottom' is not overridden */
        left: 50%;              /* Move left edge to the center */
        transform: translateX(-50%); /* Pull back by half its own width to center */
        right: auto;            /* Unset any 'right' value from other rules */
    }
    
    .control-btn:hover {
        /* On mobile, transform upwards instead of sideways */
        transform: translateY(-10px) scale(1.15);
    }
    
    .tooltip {
        top: -45px; /* A little more space */
        left: 50%;
        right: auto;
        transform: translateX(-50%); /* Center the tooltip */
    }

    .tooltip:hover {
        opacity: 1; /* Re-apply tooltip visibility on mobile */
    }
    
    .tooltip::after {
        top: 100%; /* Arrow at the bottom of the tooltip */
        left: 50%;
        transform: translateX(-50%);
        border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    }
}

/* ---------------------------------------------------------------------------------------------- */
/*
 * ==========================================================================
 *  For the "by series" section in freenove-docs
 * ==========================================================================
 */

/* Table overall style */
table.docutils.product-table {
    margin: 20px auto; /* Center and add margin */
    border-collapse: separate; /* Using separate can achieve rounded corner effects. */
    border-spacing: 0;
    border: 1px solid #dfe2e5; /* External border */
    border-radius: 8px; /* Add rounded corners */
    box-shadow: 0 4px 8px rgba(0,0,0,0.08); /* Add a soft shadow */
    overflow: hidden; /* Ensure rounded corners are displayed correctly. */
}

/* Header style */
table.docutils.product-table thead th {
    background-color: #ff7b00; /* Use more vibrant brand colors */
    color: #ffffff; /* Change the header text color to white */
    font-weight: 600; /* Bold the font */
    padding: 18px 12px; /* Increase padding */
    text-align: center;
    border-bottom: 1px solid #dfe2e5;
}

table.docutils.product-table thead th p{
    font-size: 1.3em !important;
}

/* Table Cell Styling */
table.docutils.product-table td {
    padding: 15px 12px;
    border-top: 1px solid #dfe2e5;
    vertical-align: middle;
    text-align: center;
}

/* Image Styling */
table.docutils.product-table td .centered img {
    height: auto;
    border-radius: 4px; /* Add subtle rounded corners to images */
    transition: transform 0.2s ease-in-out; /* Add hover zoom effect */
}

table.docutils.product-table td .centered img:hover {
    transform: scale(1.05);
}

/* Product Name Styling */
table.docutils.product-table td p strong {
    font-size: 1.1em;
    color: #333; /* Normal Text Color */
    font-weight: 600;
}

/* SKU Text Styling */
table.docutils.product-table td .centered code {
    background-color: #eef0f2;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

table.docutils.product-table .product-image {
    cursor: pointer;
}

/* Purchase Button Styling */
.purchase-icon {
    transition: transform 0.2s ease-in-out; /* Smooth Zoom Effect */
}

.purchase-icon:hover {
    transform: scale(1.2); /* Hover Scale 20% Effect */
}

.product-table td a::after {
    display: none !important;
}

/* ---------------------------------------------------------------------------------------------- */

/*
 * ==========================================================================
 *  Text style with background color
 * ==========================================================================
 */

.bg-blue{
    padding: 5px 6px;
    background-color: #0000ff;
    color: #ffffff;
}

.bg-green{
    padding: 5px 6px;
    background-color: #00ff00;
    color: #ffffff;
}

.bg-red{
    padding: 5px 6px;
    background-color: #ff0000;
    color: #ffffff;
}

.bg-purple{
    padding: 5px 6px;
    background-color: #ff00ff;
    color: #ffffff;
}

.image-border img{
    border: 1px solid #000000 !important;
    margin-bottom: 2rem !important; 
}

/* ---------------------------------------------------------------------------------------------- */