/* static/css/style.css */

/* ===== CSS VARIABLES ===== */
:root {
    --border-color: #bbbbbb;
    --border-color-dark: #717171;
}

/* ===== CAMPAIGNS STYLES ===== */

/* Campaign message styling - compact line height like ASP */
.campaigns-table .message-td {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    color: #3f3e3e;
    line-height: 1.1;
}

.campaign_title {
    font-size: 14px;
    color: Black;
    font-weight: bold;
    font-family: Verdana, Arial, sans-serif;
}

.campaigns-table .message-td .campaign-message {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #3f3e3e;
    line-height: 1.1;
}

.campaigns-table .message-td .categories-title {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.1;
}

.campaigns-table .message-td .networks-text {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 11px;
    color: black;
    line-height: 1.1;
}

.campaigns-table td {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.1;
    vertical-align: middle;
    padding: 4px;
    border: 1px solid #666;
}

.campaigns-table th {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
}

/* Rotated text styling */
.campaigns-table .rotated-text {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: black;
}

/* Banner text styling */
.campaigns-table .banners-td {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: black;
    text-align: center;
}

/* Website text styling */
.campaigns-table .websites-td {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: black;
}

.campaigns-table .websites-td a {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: blue;
    text-decoration: underline;
}

/* MediaShop text styling */
.campaigns-table .mediashop-td {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: black;
    text-align: center;
}

/* Campaign Header */
.campaign-header {
    background-color: #333;
    color: white;
    padding: 10px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.campaign-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.campaign-header-title {
    font-size: 18px;
    font-weight: bold;
}

.period-filters {
    display: flex;
    gap: 5px;
}

.period-btn {
    padding: 5px 10px;
    background-color: #555;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.period-btn:hover {
    background-color: #666;
}

.period-btn.highlight {
    background-color: #d32f2f;
}

.status-filters {
    display: flex;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: white;
}

.sort-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 12px;
    color: white;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Campaign Table */
.global-campaign-table-container {
    margin: 0;
    padding: 0;
}

.campaigns-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 1500px;
    table-layout: fixed;
}


.campaigns-table .advertiser-td {
    overflow: visible;
}

.campaign_header_tr {
    background-color: #333;
    color: white;
    height: 30px;
    font-size: 18px
}

.campaign_header_tr td {
    padding: 8px 4px;
}

.campaign-body-tr {
    background-color: white;
    height: 76px;
}

/* Removed hover effect to preserve row colors */

/* Rotated Text */
.rotated-text {
    width: 24px !important;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.rotated-content {
    display: inline-block;
    transform: rotate(-90deg);
    transform-origin: center center;
    white-space: nowrap;
    font-size: 12px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.td_bernie {
    background-color: #1871d0 !important;
}

/* Campaign Elements */
.camp-title {
    font-family: Verdana;
    font-weight: bold;
    font-size: 14px;
    color: #3f3e3e;
    text-decoration: none;
}

.camp-title:hover {
    text-decoration: underline;
}

.categories-title {
    font-size: 12px;
    font-weight: bold;
}

.dateRangeTitle {
    font-size: 12px;
    font-weight: bold;
}

.dateRange {
    font-size: 12px;
}

.hand {
    cursor: pointer;
}

/* ===== END CAMPAIGNS STYLES ===== */

/* Wrapper για να προσθέσουμε το κενό */
.table-wrapper {
    padding-left: 20px;
    padding-right: 20px;
}

/* Μείωση padding στους πίνακες */
table td, table th {
    padding: 4px !important; /* Μείωση padding */
    vertical-align: middle !important; /* Aligns content vertically to the middle */

}

/* Κάνουμε τους πίνακες να καλύπτουν το 100% του πλάτους */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;  /* Μείωση του font-size */
}

.custom-bordered-table, 
.custom-bordered-table th, 
.custom-bordered-table td {
    border: 1px solid rgb(136, 136, 136) !important; /* Σκούρο περίγραμμα μόνο για αυτόν τον πίνακα */
    border-collapse: separate;
    border-spacing: 0;
}



/* Αφαίρεση του default container του Bootstrap */
.container, .container-fluid {
    width: 100%;
    padding-left: 20px; /* Προσθήκη padding στο container */
    padding-right: 20px; /* Προσθήκη padding στο container */
    margin-left: 0;
    margin-right: 0;
}

a {
    color: #23658d;
}

.c {
    text-align: center;
}


/* Κάνουμε το ενεργό κουμπί bold */
.btn-active {
    font-weight: bold;
    opacity: 1;
}



/* Style for hover effects on rate buttons */
.rate-button-1 {
    background-color: rgb(184, 211, 184);
    color: white;
}

.rate-button-2 {
    background-color: rgb(226, 185, 185);
    color: white;
}

.rate-button-1:hover {
    background-color: rgb(47, 146, 47);
    color: white;
}
 
.rate-button-2:hover {
    background-color: rgb(182, 22, 22);
    color: white;
}


.rate-filter .btn-light {
    opacity: 0.3; /* Αχνό */
}

.rate-filter .btn-light.btn-primary {
    opacity: 1; /* Πλήρης ένταση για το επιλεγμένο κουμπί */
}

table tbody tr td.num {
    text-align: right;
    font-size: 16px;
    padding-right: 6px !important;
    vertical-align: middle; /* Aligns content vertically to the middle */
}



/* AUTOCOMPLETE */

.autocomplete-item {
    display: flex;
    align-items: center; /* Κεντράρει κάθετα το περιεχόμενο */
    padding: 5px; /* Προσθέτει padding για να μην είναι κολλημένα τα στοιχεία */
}

.ui-autocomplete {
    height: 440px;
    overflow-y: scroll;
    overflow-x: hidden;
}

.autocomplete-logo {
    width: 90px; /* Μείωση του πλάτους */
    height: 44px; /* Μείωση του ύψους */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-right: 8px; /* Μικρότερο περιθώριο */
}

.autocomplete-logo img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.autocomplete-details {
    flex: 1;
    text-align: left;
}

.autocomplete .url {
    font-size: 12px; /* Μείωση του μεγέθους της γραμματοσειράς */
    color: gray;
    margin-top: 0px
}

.autocomplete .title {
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: -3px;
    font-weight: bold;
}



.advertiser_row:hover {
    background-color: #d5eaf7;
}


.match_advertisers .advertiser_title {
    font-size: 20px; margin: 0px
    
}

.match_advertisers td {
    padding: 10px !important;
    vertical-align: top !important
}

.domain_match {
    background-color: Green;
    color: white;
    padding: 2px 4px;
    width: 120px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

/* ------------------------ Google Advertiser Rating ------------------------ */
.rate_button {
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 15px;
    border: 1px solid #0a4518 !important;
    font-weight: bold;
    border-radius: 0 !important;
}

.red { background-color: #dc3545; /* Κόκκινο */ }
.red_light { background-color: #f3e1e3; color: black; border: 1px solid #d3aeb3 !important; color: #d8655b; font-weight: normal; }

.green { background-color: #15702a; /* Πράσινο */ }
.green_light { background-color: #ddf1e2; color: black; border: 1px solid #a0b4a5 !important; color: cadetblue; font-weight: normal}

/* Αχνό κουμπί όταν το rate είναι 0 */
.light {
    opacity: 0.6;
    border: none !important;
    color: black !important;
}



/* ------------------------ YouTube Unmatched Videos ------------------------ */

#video_container .video_title {
    font-size: 24px;
    margin: 0px;
    margin-bottom: 10px;
    line-height: 24px;
}

#video_container td {
    font-size: 16px;
    border: 1px solid #d3d3d3;
}



.yt_details td {
    padding: 6px 8px !important;
}

.yt_details {
    margin-bottom: 8px
}



.flag_icon {
    width: 52px;  /* Adjust width and height based on your design */
    height: auto;
    margin-right: 10px;
}

.guid {
    font-size: 10px;
    cursor: pointer;
}

.guid:hover {
    color: red
}

.page_title {width:auto; font-size:26px; padding:5px; margin-bottom: 20px; background-color: #717f87; color:White;font-family: Arial}

/* ===== CAMPAIGN PAGE SPECIFIC STYLES ===== */

/* Category Modal Styles */
.category-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.category-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    width: 85%;
    max-width: 1000px;
    height: 90%;
    overflow-y: auto;
}

.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.category-modal-title {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.category-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.category-modal-close:hover {
    background-color: #f0f0f0;
}

.category-search-container {
    position: relative;
    flex: 1;
    margin: 0 20px;
}

.category-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.category-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.category-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.category-search-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.category-search-item:hover {
    background-color: #f8f9fa;
}

.category-search-item:last-child {
    border-bottom: none;
}

.category-search-path {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.category-modal-columns {
    display: flex;
    gap: 10px;
    height: calc(100% - 100px);
}

.category-column {
    flex: 1;
    border-right: 1px solid #eee;
    padding-right: 8px;
}

.category-column:last-child {
    border-right: none;
    padding-right: 0;
}

.category-column-title {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.category-column-content {
    height: 100%;
    overflow-y: auto;
}

.category-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 15px;
    padding: 2px 10px;
}

.category-item:hover {
    background-color: #e3f2fd;
}

.category-checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.category-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.2;
}

.category-modal-footer {
    margin-top: 8px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.category-update-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

/* Campaign Content Styles - Campaign Page Only */
.campaign-page .campaign-link {
    color: #003366;
    text-decoration: none;
    word-break: break-all;
}

.campaign-page .campaign-link:hover {
    text-decoration: underline;
}

.campaign-page .same-target {
    background: #fff177;
    padding: 3px;
}

.campaign-page .campaign-row {
    cursor: pointer;
    position: relative;
}

/* Removed hover effect to preserve row colors */

.campaign-page .campaign-row.drag-over {
    background-color: #b2d0ed !important;
    z-index: 5000 !important;
    position: relative !important;
    outline: 3px solid #0066cc !important;
}

.campaign-page .advLogo {
    background: white;
    width: 100%;
    height: 100px;
    border: 1px solid var(--border-color);
    text-align: center;
    vertical-align: middle;
    display: table-cell;
}

.campaign-page #campaign_layout_row {
    display: grid;
    grid-template-columns: 65% 35%;
    column-gap: 12px;
    align-items: start;
}

.campaign-page #campaign_info { 
    min-width: 0; 
}

@media (max-width: 1200px) {
    .campaign-page #campaign_layout_row { 
        grid-template-columns: 1fr; 
    }
}

.campaign-page .campaign_top_row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.campaign-page #top_left_column {
    flex: 0 0 270px; /* ~256 logo + padding */
}

.campaign-page #top_right_column {
    flex: 1 1 auto;  /* γεμίζει όλο το υπόλοιπο */
    min-width: 0;    /* για να μη σπρώχνουν μεγάλα links */
}

/* Campaign Websites Styles - Campaign Page Only */
.campaign-page .websites_section {
    margin-top: 10px; 
    margin-bottom: 10px; 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.campaign-page .websites_nav_container {
    display: block; 
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
}

.campaign-page .websites_container {
    display: flex; 
    gap: 6px; 
    overflow-x: auto; 
    overflow-y: hidden;
    scrollbar-width: auto;
    scrollbar-color: #aac6e8 #f1f5f9;
    width: auto;
    max-width: 100%;
    height: 80px;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

.campaign-page .websites_container::-webkit-scrollbar {
    height: 12px;
}

.campaign-page .websites_container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.campaign-page .websites_container::-webkit-scrollbar-thumb {
    background: #aac6e8;
    border-radius: 6px;
}

.campaign-page .websites_container::-webkit-scrollbar-thumb:hover {
    background: #8bb5e3;
}

.campaign-page .website_card {
    flex: 0 0 auto;
    width: 100px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

.campaign-page .website_card:hover {
    border: 1px solid #18436e;
}

.campaign-page .website_logo_container {
    width: 100%;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.campaign-page .website_logo {
    max-width: 90px; 
    max-height: 24px; 
    object-fit: contain; 
    display: block;
}

.campaign-page .website_dates {
    width: 100%;
    font-size: 11px;
    color: #212121;
    line-height: 1.3;
}

/* Campaign Modal Z-Index Override - Campaign Page Only */
.campaign-page div[id*="Modal"],
.campaign-page div[id*="modal"] {
    z-index: 999999 !important;
    position: fixed !important;
}

.campaign-page button,
.campaign-page .button,
.campaign-page input[type="button"] {
    z-index: auto !important;
    position: relative !important;
}

.campaign-page .campaign-row div,
.campaign-page .banner-item div,
.campaign-page div[style*="z-index: 10"],
.campaign-page div[style*="z-index: 1;"] {
    z-index: auto !important;
}

.campaign-page div[id*="Modal"]>div,
.campaign-page div[id*="modal"]>div {
    z-index: 1000000 !important;
    position: relative !important;
}

/* ===== BANNER DROPDOWN MENU STYLES ===== */
.banner-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    min-width: 80px;
}

.banner-dropdown-option {
    padding: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    border-bottom: 1px solid #eee;
    background-color: white;
    text-align: left;
}

.banner-dropdown-option:hover {
    background-color: #dbdbdb !important;
}

.banner-dropdown-option:last-child {
    border-bottom: none;
}

.banner-dropdown-option.remove {
    color: #dc3545;
}

/* ===== BANNER WEBSITES STYLES ===== */
.website-item {
    display: inline-block;
    border: 1px solid #bbbbbb;
    padding: 3px 5px;
    font-size: 14px;
}

.website-item.ranking-high {
    font-weight: bold;
}

.website-item.adtype-1 {
    background-color: white;
}

.website-item.adtype-2 {
    background-color: #c4c4c4;
}

.website-item.adtype-9 {
    background-color: rgb(221, 247, 247);
}

.website-item a {
    text-decoration: none;
    color: inherit;
}

.website-item .screenshotButton {
    display: inline-block;
    margin-left: 4px; margin-right: 0px;
}

.headerCell {
    background-color: #ebedee !important;
    font-size: 15px !important;

}