.partner-section {
/*    background-color: #f4f1f1;*/
    border: 1px solid #ccc;
    border-radius: 16px;
    /*box-shadow: 0 4px 12px rgba(0,0,0,0.1);*/
/*    font-family: 'Segoe UI', sans-serif;*/
}

.partner-nav {
    gap: 0!important;
    display: flex;
   flex-wrap: nowrap;
}

.partner-tab-link {
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.partner-nav .partner-tab-link.active {
    position: relative;
    z-index: 1;
    border: 1px solid #9da8b3;
    border-bottom-color: #fff;
    background: #fff;
    color: #343a40;
    font-weight: 700;
}

/* Mỗi nhóm sponsor, organizer, media */
.partner-block {
    /*margin: 10px 5px;*/
    padding: 10px;
    /*border: 1px solid #e0e0e0;*/
    /*border-radius: 12px;*/
/*    background-color: #ecfffc;*/
/*    box-shadow: 0 2px 6px rgba(0,0,0,0.05);*/
}

/* Tiêu đề nhóm */
.partner-block h3 {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}


.partner-section-radio {
    display: flex;
    justify-content: space-between;
    margin: 0 10px;
    padding-top: 20px;
}

/* -------- Poster slider ------- */
.poster-preview-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.poster-preview-text {
    font-weight: bold;
    font-size: 13px !important;
}

.poster-preview-image {
  gap: 5px;
  padding: 10px 0;
  margin-left: 15px;
}

.slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: auto; /* IE/Edge */
  scrollbar-width: thin; /* Firefox */
}

/* Luôn hiện scrollbar */
.slider::-webkit-scrollbar {
  height: 10px;
  background: #f0f0f0; /* Nền thanh cuộn */
}

.slider::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.6); /* Màu thanh kéo */
  border-radius: 4px;
  transition: background-color 0.3s ease;
}


.poster-item {
  min-width: 165px;
  flex-shrink: 0;
  scroll-snap-align: start;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 4px;
}

.poster-item.selected {
    border-color: blue;
    background-color: #f0f8ff;
}

.poster-item p {
    margin-bottom: 0;
    padding-top: 6px;
}

.poster-item img {
    width: 160px;
    border-radius: 8px;
    transition: 0.3s;
    height: 90px;
}
.custom-poster-upload-thumb {
    display: flex;
    width: 160px;
    height: 90px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed #007bff;
    border-radius: 8px;
    background: linear-gradient(145deg, #edf6ff, #d8ebff);
    color: #0068d8;
    background-position: center;
    background-size: cover;
}
.custom-poster-plus {
    font-size: 38px;
    font-weight: 700;
    line-height: 30px;
}
.custom-poster-jpg {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 700;
}
.custom-poster-upload-thumb.has-image {
    justify-content: flex-end;
    border-style: solid;
}
.custom-poster-change {
    width: 100%;
    padding: 4px 0;
    background: rgba(0, 45, 105, .8);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.custom-poster-item.uploading {
    pointer-events: none;
    opacity: .65;
}
.custom-poster-item.upload-error p {
    color: #dc3545;
    font-size: 11px;
}
.poster-item:hover {
  border-color: #007bff;
}

.poster-setting-text {
    display: block;
    font-weight: bold;
    font-size: 13px !important;
    margin-bottom: 20px;
}
/* Khu điều hướng ← 1/3 → */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.nav button {
    background-color: #7bcdfa;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.nav button:hover {
    background-color: #07a8ff;
}

.nav span {
    font-weight: bold;
    font-size: 16px;
}

/* Ô nhập partner */
.partner-item-input input {
    width: 62%;
    min-width: 0;
    padding: 7px 8px;
    margin: 7px 0 7px 6px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 14px;
}

.partner-item-input-label {
    font-weight: bold;
    margin-bottom: 0;
    font-size: 14px;
    white-space: nowrap;
}

/* Nút xóa */
.partner-item button {
    width: 100%;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
}

.partner-item button:hover {
    background-color: #c82333;
}

.partner-item-input {
    display: flex;
    justify-content: center;
    align-items: center;
}

.position-block-control {
    display: flex;
    justify-content: space-around;
    align-items: baseline;
}

.position-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-weight: bold;
}

.position-buttons {
    display: flex;
/*    gap: 10px;*/
    margin-top: 5px;
}

.position-buttons button {
    background-color: #ececec;
/*    border: 1px solid #ccc;*/
    padding: 5px 8px;
    cursor: pointer;
    font-weight: 500;
    min-width: 35px;
    color: black;
    outline: none;
}

.position-buttons button:hover {
    background-color: #bab9b9;
}

.position-buttons button.selected {
    background-color: #7bcdfa;
}

.display-container {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.display-container-label {
    font-size: 13px;
    font-weight: 700;
}

.partner-logo-entry {
    display: grid;
    grid-template-columns: minmax(58px, 1fr) auto 64px;
    align-items: center;
    gap: 5px;
    margin: 7px 0;
}

.partner-logo-entry .partner-item-input-text {
    width: 100%;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 6px 7px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
    text-transform: uppercase;
}

.partner-logo-or-label {
    color: #666;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.partner-logo-file-input {
    display: none;
}

.partner-section .partner-logo-upload-button {
    width: 64px;
    height: 36px;
    margin: 0;
    padding: 0 4px;
    border-radius: 5px;
    background: #ff7300;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.partner-section .partner-logo-upload-button:hover {
    background: #e06600;
}

.partner-section .partner-logo-upload-button:disabled {
    cursor: wait;
    opacity: .75;
}

.partner-position-choices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
}

.partner-section .position-choice {
    position: relative;
    width: 50px;
    height: 31px;
    padding: 0;
    border: 2px solid #9aa2aa;
    border-radius: 3px;
    background: #fff;
}

.partner-section .position-choice:hover,
.partner-section .position-choice.selected {
    border-color: #ef2028;
    background: #fff7f7;
}

.position-marker {
    position: absolute;
    width: 9px;
    height: 7px;
    border: 2px solid currentColor;
    border-radius: 1px;
    color: #9aa2aa;
}

.position-choice:hover .position-marker,
.position-choice.selected .position-marker {
    color: #ef2028;
}

.marker-left-up { left: 4px; top: 4px; }
.marker-left-down { left: 4px; bottom: 4px; }
.marker-right-down { right: 4px; bottom: 4px; }

.display-option {
    display: flex;
    align-items: center;
    gap: 15px;
}

.display-option label {
    margin-bottom: -2px;
}

.partner-button {
    display: flex;
    justify-content: space-around;
}

.partner-button button {
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
    outline: none;
    width: 45%;
}

.partner-section button {
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
    outline: none;
}

.submitButton {
    background-color: #007bff;
}

.submitButton:hover {
    background-color: #e66a00;
}

/* Mặc định */
#submitListTeamButton.enabled {
  background-color: #007bff;
  cursor: pointer;
}

#submitListTeamButton.enabled:hover {
  background-color: #007bff;
}

/* Disabled */
#submitListTeamButton.disabled {
  background-color: gray;
  cursor: not-allowed;
}

.add-button {
    align-self: stretch;
    display: flex;
    flex: 0 0 92px;
    min-width: 92px;
    min-height: 100%;
    margin: 0;
    padding: 12px 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #087cf0 !important;
    border-radius: 8px;
    background: #eef7ff;
    color: #0867c9 !important;
}

.add-button:hover {
    background-color: #dcefff;
}

.partner-add-plus {
    font-size: 34px;
    line-height: 30px;
    font-weight: 800;
}

.partner-add-text {
    margin-top: 5px;
    font-size: 13px;
}

.delete-button {
    background-color: red;
    margin-top: 15px;
    margin-bottom: 10px;
    width: 90%;
}

.delete-button:hover {
    background-color: #b10000;
}
/* ------- Slider ---------- */
.partner-slider {
  align-items: stretch;
  gap: 10px;
  margin-bottom: 15px;
}
.partner-card {
  position: relative;
  border: 1px solid #ccc;
  padding: 10px 9px 9px;
  width: 196px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fafafa;
}

.partner-item-preview {
    text-align: center;
}

.partner-logo-preview {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    margin-bottom: 3px;
}

.partner-name-display {
    min-height: 18px;
    padding: 0 19px;
    overflow: hidden;
    color: #666;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.partner-section .partner-card-remove {
    position: absolute;
    z-index: 2;
    top: 4px;
    right: 4px;
    width: 25px;
    height: 25px;
    padding: 0;
    border: 1px solid #e53935;
    border-radius: 50%;
    background: #fff;
    color: #e53935;
    font-size: 22px;
    font-weight: 500;
    line-height: 21px;
}

.partner-section .partner-card-remove:hover {
    background: #e53935;
    color: #fff;
}

.partnerSubmitButton {
    margin-bottom: 25px;
    width: 90%;
}

.poster-download-actions .partnerSubmitButton {
    background: #ff7300;
}

.poster-download-actions .partnerSubmitButton:hover {
    background: #e06600;
}

.posterDownloadButton {
    margin-bottom: 25px;
    background: #007bff;
}

.posterDownloadButton:hover {
    background: #0069d9;
}

.matchContentButton,
.matchContentCopyButton {
    background: #007bff;
}

.matchContentButton:hover,
.matchContentCopyButton:hover {
    background: #0069d9;
}

.poster-download-actions {
    gap: 8px;
}

.poster-download-actions button,
.poster-download-actions .partnerSubmitButton {
    width: calc((100% - 16px) / 3);
    margin-bottom: 25px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: nowrap;
}

.poster-download-schedule[hidden] {
    display: none;
}

.poster-download-schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 4px 5% 18px;
    padding: 14px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #f7f7f7;
}

.poster-download-schedule label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #444;
    font-size: 13px;
    font-weight: bold;
}

.poster-download-schedule input {
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 7px;
    background: #fff;
    font: inherit;
}

.match-content-panel[hidden] {
    display: none;
}

.match-content-panel {
    display: grid;
    gap: 12px;
    margin: -6px 5% 18px;
}

.match-content-card {
    overflow: hidden;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #f7f7f7;
}

.match-content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.partner-section .matchContentCopyButton {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12px;
}

.match-content-card textarea {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 11px;
    resize: vertical;
    border: 0;
    border-top: 1px solid #dedede;
    border-radius: 0;
    outline: none;
    background: #fff;
    color: #222;
    font: 14px/1.5 Arial, sans-serif;
    text-align: left;
    text-transform: none;
}

#matchContentLong {
    min-height: 190px;
}

@media (max-width: 575px) {
    .poster-download-schedule {
        grid-template-columns: 1fr;
    }

    .poster-download-actions {
        gap: 5px;
    }

    .poster-download-actions button,
    .poster-download-actions .partnerSubmitButton {
        width: calc((100% - 10px) / 3);
        padding-right: 4px;
        padding-left: 4px;
        font-size: 11px;
    }

}

/* Copy poster section */
.copy-poster-section {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.copy-poster-section .copy-poster-label {
    margin: 0;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.copy-poster-history-row {
    display: block;
    min-width: 0;
}

#previousPosterMatchSelect {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #aeb7c2;
    border-radius: 7px;
    background: #fff;
    color: #333;
    font-size: 14px;
}

#copy-poster-message {
    grid-column: 1 / -1;
}
