/* Base launcher */
.monthly-tips-launcher {
    position: fixed;
    z-index: 999999; /* super high to be on top */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    cursor: pointer;
    font-family: inherit;
}

/* Hide launcher when panel is open */
.monthly-tips-launcher.monthly-tips-launcher-hidden {
    display: none;
}

/* Side modifiers */
.monthly-tips-launcher.side-right {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.monthly-tips-launcher.side-left {
    left: 0;
    border-radius: 0 8px 8px 0;
}

/* Tab orientation */
.monthly-tips-launcher.orientation-horizontal {
    flex-direction: row;
}

.monthly-tips-launcher.orientation-vertical {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.monthly-tips-launcher.orientation-vertical-down {
    display: flex;
    flex-direction: column;      /* icon on top, text below */
    align-items: center;
    justify-content: center;
    text-align: center;
}

.monthly-tips-launcher.orientation-vertical-down .monthly-tips-launcher-text {
    writing-mode: vertical-rl;   /* vertical text */
    text-orientation: mixed;
    white-space: nowrap;
}

/* 2) Vertical text, icon on bottom, reading up */
.monthly-tips-launcher.orientation-vertical-up {
    display: flex;
    flex-direction: column-reverse;  /* text on top, icon below visually; icon appears "bottom" relative to page edge */
    align-items: center;
    justify-content: center;
    text-align: center;
}

.monthly-tips-launcher.orientation-vertical-up .monthly-tips-launcher-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    transform: rotate(180deg);      /* make the letters read upward instead of downward */
}

/* Make sure images and text play nicely together */
.monthly-tips-launcher.orientation-vertical-down img,
.monthly-tips-launcher.orientation-vertical-up img {
    display: block;
    max-width: 32px;   /* adjust to taste */
    height: auto;
    margin: 4px 0;
}

/* Style variants (overridable by inline bg color) */
.monthly-tips-launcher.style-light {
    background: #ffffff;
    color: #333333;
}

.monthly-tips-launcher.style-dark {
    background: #222222;
    color: #ffffff;
}

.monthly-tips-launcher.style-accent {
    background: #f0b429;
    color: #222222;
}

.monthly-tips-launcher img {
    max-width: 40px;
    height: auto;
    display: block;
}

.monthly-tips-launcher-text {
    font-size: 14px;
    font-weight: 600;
}

/* Base panel */
.monthly-tips-panel {
    position: fixed;
    top: 0;
    width: 340px;
    max-width: 90%;
    height: 100vh; /* default; overridden inline per launcher */
    box-shadow: -2px 0 12px rgba(0,0,0,0.25);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999998; /* just below launcher */
    display: flex;
    flex-direction: column;
}

/* Side: right */
.monthly-tips-panel.side-right {
    right: 0;
    left: auto;
}

.monthly-tips-panel.side-right.open {
    transform: translateX(0);
}

/* Side: left */
.monthly-tips-panel.side-left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

.monthly-tips-panel.side-left.open {
    transform: translateX(0);
}

/* Panel style variants (overridable by inline bg color) */
.monthly-tips-panel.style-light {
    background: #f9f9f9;
    color: #333333;
}

.monthly-tips-panel.style-dark {
    background: #1c1c1c;
    color: #f5f5f5;
}

.monthly-tips-panel.style-accent {
    background: #fff9e6;
    color: #333333;
}

.monthly-tips-panel-inner {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}

/* Close button */
.monthly-tips-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    float: right;
    cursor: pointer;
    padding: 0;
    margin: 0;
    /* Force a normal font so we don't get a ? from icon fonts */
    font-family: Arial, Helvetica, sans-serif !important;
}

.monthly-tips-close-icon {
    display: inline-block;
    line-height: 1;
}

.monthly-tips-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.monthly-tips-content {
    font-size: 14px;
}

.monthly-tip-item {
    margin-bottom: 20px;
}

.monthly-tip-item-title {
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 600;
}

