/* Shared Date Picker Dialog & Toolbar Styles */

/* --- cc.js consumer (pub- / dialog-overlay / close-button-x) --- */

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.close-button-x {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #3e5500;
    border-radius: 50%;
    color: #fdfde5;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    user-select: none;
}

#publishedDateDialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #113803;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    z-index: 1001;
    min-width: 300px;
    border: 1px solid #3e5500;
    color: #fdfde5;
}

#publishedDateDialog h3 {
    margin-top: 0;
    color: #ff9700;
}

/* Published date toolbar buttons */
.ccyearBTN {
    background-image: url(../img/cc/year.svg);
    background-size: 39px 117px;
    background-repeat: no-repeat;
    display: block;
    width: 39px;
    height: 39px;
    text-indent: -9999px;
}

.ccmonthBTN {
    background-image: url(../img/cc/month.svg);
    background-size: 39px 117px;
    background-repeat: no-repeat;
    display: block;
    width: 39px;
    height: 39px;
    text-indent: -9999px;
}

.ccdayBTN {
    background-image: url(../img/cc/day.svg);
    background-size: 39px 117px;
    background-repeat: no-repeat;
    display: block;
    width: 39px;
    height: 39px;
    text-indent: -9999px;
}

.ccpubCopyBTN {
    background-image: url(../img/ad/downcircle.svg);
    background-size: 39px 117px;
    background-repeat: no-repeat;
    display: block;
    width: 39px;
    height: 39px;
    text-indent: -9999px;
}

.ccyearBTN:hover,
.ccmonthBTN:hover,
.ccdayBTN:hover,
.ccpubCopyBTN:hover {
    background-position: 0 -39px;
}

.ccyearBTN:active,
.ccmonthBTN:active,
.ccdayBTN:active,
.ccpubCopyBTN:active {
    background-position: 0 -78px;
}

/* Toolbar button container */
.pub-header {
    position: relative;
}

.pub-toolbar-row {
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-toolbar-container {
    position: relative;
    margin: 10px 0;
    min-height: 32px;
}

.pub-toolbar-container .ccfindsvgbutton {
    display: inline-block;
    width: 32px;
    height: 32px;
    position: relative;
    float: left;
}

.pub-toolbar-container .ccfindsvgbutton:has(.cctimeresetBTN) {
    width: 41.6px;
    height: 41.6px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.cctimeresetBTN) .tooltiptext {
    font-size: 15.6px;
    padding: 5.2px 10.4px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccyearBTN) {
    margin-left: 6.5px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccmonthBTN) {
    margin-left: 18.2px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccdayBTN) {
    margin-left: 5.2px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccpubCopyBTN) {
    margin-left: 10px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccyearBTN),
.pub-toolbar-container .ccfindsvgbutton:has(.ccmonthBTN),
.pub-toolbar-container .ccfindsvgbutton:has(.ccdayBTN),
.pub-toolbar-container .ccfindsvgbutton:has(.ccpubCopyBTN) {
    width: 41.6px;
    height: 41.6px;
}

.pub-toolbar-container .ccfindsvgbutton:has(.ccyearBTN) .tooltiptext,
.pub-toolbar-container .ccfindsvgbutton:has(.ccmonthBTN) .tooltiptext,
.pub-toolbar-container .ccfindsvgbutton:has(.ccdayBTN) .tooltiptext,
.pub-toolbar-container .ccfindsvgbutton:has(.ccpubCopyBTN) .tooltiptext {
    font-size: 15.6px;
    padding: 5.2px 10.4px;
}

.pub-toolbar-container .ccfindsvgbutton a {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    text-indent: -1000em;
    text-decoration: none;
    position: relative;
}

.pub-toolbar-container .ccfindsvgbutton a:hover {
    opacity: 0.8;
}

.pub-toolbar-container .ccfindsvgbutton a:active {
    position: relative;
    top: 1px;
}

#pubDateDisplay {
    width: 162px;
    height: 39px;
    margin-left: 16px;
}

.pub-toolbar-container .tooltiptext {
    visibility: hidden;
    background-color: #3e5500;
    color: #fdfde5;
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px;
    position: absolute;
    z-index: 1001;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.pub-toolbar-container .tooltiptext::after {
    content: "";
    position: absolute;
    border: 5px solid transparent;
}

.pub-toolbar-container .tooltiptop {
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
}

.pub-toolbar-container .tooltiptop::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #3e5500;
}

.pub-toolbar-container .ccfindsvgbutton:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* --- ccedit.js consumer (ccedit-pub- prefix) --- */

#ccedit-publishedDateDialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #113803;
    border: 2px solid #3e5500;
    border-radius: 8px;
    padding: 20px;
    z-index: 2001;
    min-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#ccedit-publishedDateDialog h3 {
    margin-top: 0;
    color: #ff9700;
}

.ccedit-pub-header {
    position: relative;
}

.ccedit-pub-toolbar-row {
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ccedit-pub-toolbar-row::after {
    content: "";
    display: table;
    clear: both;
}

.ccedit-pub-toolbar-container {
    position: relative;
    margin: 10px 0;
    min-height: 32px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton {
    display: inline-block;
    width: 32px;
    height: 32px;
    position: relative;
    float: left;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.cctimeresetBTN) {
    width: 41.6px;
    height: 41.6px;
    margin-left: 26px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.cctimeresetBTN) .ccedit-pub-tooltiptext {
    font-size: 15.6px;
    padding: 5.2px 10.4px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccyearBTN) {
    margin-left: 6.5px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccmonthBTN) {
    margin-left: 18.2px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccdayBTN) {
    margin-left: 5.2px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccyearBTN),
.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccmonthBTN),
.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccdayBTN) {
    width: 41.6px;
    height: 41.6px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccyearBTN) .ccedit-pub-tooltiptext,
.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccmonthBTN) .ccedit-pub-tooltiptext,
.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:has(.ccdayBTN) .ccedit-pub-tooltiptext {
    font-size: 15.6px;
    padding: 5.2px 10.4px;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton a {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    text-indent: -1000em;
    text-decoration: none;
    position: relative;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton a:hover {
    opacity: 0.8;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton a:active {
    position: relative;
    top: 1px;
}

#ccedit-pubDateDisplay {
    width: 162px;
    height: 39px;
    margin-left: 16px;
}

.ccedit-pub-tooltiptext {
    visibility: hidden;
    background-color: #3e5500;
    color: #fdfde5;
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px;
    position: absolute;
    z-index: 2001;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.ccedit-pub-tooltiptext::after {
    content: "";
    position: absolute;
    border: 5px solid transparent;
}

.ccedit-pub-tooltiptop {
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
}

.ccedit-pub-tooltiptop::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #3e5500;
}

.ccedit-pub-toolbar-container .ccedit-pub-svgbutton:hover .ccedit-pub-tooltiptext {
    visibility: visible;
    opacity: 1;
}

.ccedit-search-date-svg {
    width: 162px;
    height: 39px;
}

.ccedit-pub-close-button-x {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: #3e5500;
    border-radius: 50%;
    color: #fdfde5;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ccedit-pub-close-button-x:hover {
    color: #ff5722;
}

#ccedit-publishedDateDialog .ccedit-pub-svgbutton:has(.ccpubCopyBTN) {
    width: 41.6px;
    height: 41.6px;
    margin-left: 10px;
}

#ccedit-publishedDateDialog .ccpubCopyBTN {
    background-image: url(../img/ad/downcircle.svg);
    background-size: 39px 117px;
    background-repeat: no-repeat;
    display: block;
    width: 39px;
    height: 39px;
    text-indent: -9999px;
}

#ccedit-publishedDateDialog .ccpubCopyBTN:hover {
    background-position: 0 -39px;
}

#ccedit-publishedDateDialog .ccpubCopyBTN:active {
    background-position: 0 -78px;
}
