/* Basis CSS für BpBB */
.bpbb {
    color: #fff;
}

.hidden{
    display: none;
}

.bpbb-success-message{
    position: absolute;
    bottom: 0;
    right: 1rem;
    padding: 12px;
    margin-bottom: 16px;
    background: #e2f1e5;
    color: green;
    border: 1px solid green;
    border-radius: 5px;
}

/* error message overlay */
.bpbb-error-message-wrapper{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 8999;
    visibility: hidden; /* initially hidden */
    opacity: 0; /* initially transparent */
}
.bpbb-error-message {
    position: relative;
    background: #fefefe;
    padding: 5rem;
    font-size: 1rem;
    font-weight: 600;
    min-height: 35vh;
    min-width: 50vw;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 6px solid #009ae1;
}

.tutor-card .bpbb-error-message{
    position: absolute;
    bottom: 0;
    right: 1rem;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 12px;
    min-height: initial;
    min-width: initial;
    margin: 1rem;
}

.bpbb_error_close{
    position: absolute;
    top: 3rem;
    right: 3rem;
    width: auto;
}
/* animation fade out */
.bpbb-error-message-wrapper.fadeOut {
    animation: fadeOut 1.5s;
    animation-fill-mode: forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.show{
    visibility: visible;
    opacity: 1;
}

[type=button]:disabled, [type=submit]:disabled,
 button:disabled, button[disabled]{
    background-color: #e9e9e9 !important;
    border-color: #bababa !important;
    color: #bababa !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
 }

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: -5px 0.5rem;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0.5, 0.5, 0.5) infinite;
    border-color: #000000 #000000 #000000 transparent;
}

.bpbb-ajax-loader .spinner{
    position: fixed;
    top: 50%;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.bpbb-ajax-loader{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.bpbb_radio div {
    display: inline-block;
}
.bpbb_radio input[type="radio"] {
    display: none;
}
.bpbb_radio input[type="radio"] + label {
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: inline-block;
}
.bpbb_radio input[type="radio"] + label span {
    display: inline-block;
    width: 25px;
    height: 25px;
    margin: -1px 4px 0 0;
    vertical-align: middle;
    cursor: pointer;
    /*border-radius: 50%;*/
    border: 1px solid #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.33);
    background-repeat: no-repeat;
    background-position: center;
    text-align: center;
    line-height: 35px;
    width: 35px;
    height: 35px;
}
.bpbb_radio input[type="radio"] + label span img {
    opacity: 0;
    transition: all 0.3s ease;
}
.bpbb_radio input[type="radio"] + label span {
    transition: all 0.3s ease;
    background-color: #aad0ff;
}
.bpbb_radio input[type="radio"]:checked + label span {
    background-color: #148bf4;
}
.bpbb_radio input[type="radio"]:checked + label span img {
    opacity: 1;
}

.bpbb_label_note{
    font-size: 0.7rem;
    text-align: center;
    display: block!important;
    margin: 0.8rem;
}

button.close{
    align-self: end;
}

button.close:after{
    display: inline-block;
    content: "\00d7"; /* This will render the 'X' */
}

.input-hint{
    font-size: 0.8rem;
    color: #666;
}

.tutor-login-wrap, #tutor-registration-wrap{
    max-width: 700px !important;
}

.tutor-list{
    position: relative;
    padding-bottom: 24px;
}
.bottom-separator{
    border-bottom: 1px solid #ccc;
}

.tutor-filter-list ul.tutor-list-children{
    padding-left: 25px
}

.tutor-list-item label input[type=checkbox]{
    margin-right: 10px;
}

.tutor-form-check-input[type=radio], .tutor-form-check-input-radio{
    margin-right: 10px;
}

.tutor-pagination-wrapper-replaceable{
    position: relative;
}

.tutor-nowrap-ellipsis{
    white-space: normal!important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bpbb-event-datetime{
    margin: 0 0 1rem 0;
}

.tutor-course-name{
    margin: 1rem 0 0 0;
}

.bpbb-button-cancel{
    background-color: #fff;
    border: 1px solid #ac1e1e;
    color: #ac1e1e!important;
}
.bpbb-button-cancel:hover{
    background-color: #ac1e1e;
    color: #fff!important;
    border: 1px solid #000;
}

a#delete_user_account{
    margin-top: 2rem;
}

/* online / offline badge tag */
.has-post-thumbnail{
    position: relative;
}

.has-post-thumbnail .tutor-col-xl-8, .tutor-course-thumbnail{
    position: relative;
}

.bpbb-courses-type {
    position: absolute;
    top: 0;
    margin: 1rem 0 0 1rem;
}

.bpbb-course-type-offline{
    background: #173669;
}

.bpbb-course-type-online{
    background: #03c7fd;
}

.bpbb-course-soldout {
    position: absolute;
    top: 0;
    right: 0;
    margin: 1rem;
    padding: 0.3rem 1rem;
    background: #d50000e6;
}

.bpbb-tag{
    font-weight: bold;
    border-radius: 5px;
    color: #fff;
    padding: 0.3rem 1rem;
}

.bpbb-landkreis-tag{
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 0.3rem 1.3rem;
    background: #03c6fcb0;
    font-weight: bold;
    color: #fff;
}

/** certificate **/

.tutor-dc-button-group .tooltip-txt{
    max-width: none;
    width: auto;
}

.tutor-dc-share-button{
    display: none;
}
.tutor-dc-download-button a{
    padding: 0.5rem 1.5rem; 
}

.tutor-dc-download-button a:hover{
    font-weight: bold;
    background-color: #009ae1;
    border-radius: 5px;
}

/** dashboard **/
@media screen and (max-width: 767px) {
    .tutor-dashboard-left-menu{
        z-index: 150;
        background-color: #fff;
    }
}
.tutor-dashboard-content-inner .tutor-nav{
    margin: 0 0 2rem 0;
}

a.tutor-nav-link[data-keypage="set_api"]{
    display: none;
}

.bpbb-certificates .top-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
  
.bpbb-certificates .top-row .list-item-button {
    flex: 1;
}
  
.bpbb-certificates .top-row .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px; 
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}
  
.bpbb-certificates .dropdown-items {
    width: 100%;
    margin-top: 8px;
}
  
.bpbb-certificates .dropdown-items .list-item-button {
    width: 100%;
    margin-top: 8px; 
}

/** Tutor attendee registration **/
.tutor-attendee-name-input{
    margin-bottom: 1rem;
}

/** dashboard tutor attendee checkin */
#tutor-attendee-checkin-modal, #tutor-attendee-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px); /* Safari support */
    z-index: 100;
    flex-direction: column;
    padding: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

#tutor-attendee-checkin-modal .tutor-card, #tutor-attendee-edit-modal .tutor-card {
    background: none;

}

/* Body scroll lock when modal is open */
body.bpbb-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
}

/* WordPress Admin Bar - push modal down when present */
body.admin-bar #tutor-attendee-checkin-modal,
body.admin-bar #tutor-attendee-edit-modal {
    top: 46px;
    bottom: 100px;
}

@media (min-width: 783px) {
    body.admin-bar #tutor-attendee-checkin-modal,
    body.admin-bar #tutor-attendee-edit-modal {
        top: 32px;
    }
}

/* Desktop: Modal with spacing from edges */
@media (min-width: 768px) {
    #tutor-attendee-checkin-modal, #tutor-attendee-edit-modal {
        top: 2rem;
        left: 2rem;
        bottom: 2rem;
        right: 2rem;
        border: 1px solid #d2d2d2;
        border-radius: 12px;
    }
    
    body.admin-bar #tutor-attendee-checkin-modal,
    body.admin-bar #tutor-attendee-edit-modal {
        top: calc(32px + 2rem);
    }
}

/* Large Desktop: More spacing */
@media (min-width: 1200px) {
    #tutor-attendee-checkin-modal, #tutor-attendee-edit-modal {
        top: 4rem;
        left: 4rem;
        bottom: 4rem;
        right: 4rem;
    }
    
    body.admin-bar #tutor-attendee-checkin-modal,
    body.admin-bar #tutor-attendee-edit-modal {
        top: calc(32px + 4rem);
    }
}

/* Modal inner container*/
#tutor-attendee-checkin-modal .bpbb-modal-inner,
#tutor-attendee-edit-modal .bpbb-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#tutor-attendee-edit-modal .bpbb-modal-inner .tutor-card{
    padding: 1rem;
    
}
#tutor-attendee-edit-modal .bpbb-modal-inner .tutor-card-body{
    padding: 0!important;
}

@media (min-width: 768px) {
    #tutor-attendee-checkin-modal .bpbb-modal-inner,
    #tutor-attendee-edit-modal .bpbb-modal-inner {
        padding: 2rem;
    }
}

.close-modal {
    flex-shrink: 0;
    text-align: right;
    padding: 0 0 0.75rem 0;
}

.close-modal span {
    font-size: 2.5rem;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
    display: inline;
}

.close-modal span:hover {
    color: #009ae1;
}

@media (min-width: 768px) {
    .close-modal span {
        font-size: 2rem;
    }
}

/* Modal Content - Scrollable container */
#tutor-attendee-checkin-modal .modal-content,
#tutor-attendee-edit-modal .modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

/* Card headers and content - minimal spacing adjustments */
#tutor-attendee-edit-modal .tutor-card-header h4,
#tutor-attendee-checkin-modal .tutor-card-header h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Attendees List - Responsive */
.bpbb-attendees-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Attendee Item - Mobile Card Style */
.bpbb-attendee-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #009ae1;
}

/* Mobile: Stack vertically */
.bpbb-attendee-item > .tutor-d-flex {
    flex-direction: column !important;
    gap: 0.75rem;
    align-items: flex-start !important;
}

.bpbb-attendee-info {
    width: 100%;
}

/* Certificate Sent Status - Mobile Compact */
/* Status Badge - Universal for Desktop Table & Mobile Cards */
/* Used for: Zoom participation, Certificate sent, and other status indicators */
.bpbb-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Desktop: Show checkmark icon only in table context */
@media (min-width: 768px) {
    #bpbb-attendees-table .bpbb-status-badge:not(.hidden)::before {
        content: "✓";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        background: #28a745;
        color: white;
        border-radius: 50%;
        font-weight: bold;
        font-size: 12px;
    }
    
    /* Hide text labels on desktop table */
    #bpbb-attendees-table .bpbb-status-badge .tutor-badge-label {
        display: none;
    }
}

/* Mobile: Show checkmark with descriptive text in table context */
@media (max-width: 767px) {
    #bpbb-attendees-table .bpbb-status-badge .tutor-badge-label {
        display: none !important;
    }
    
    #bpbb-attendees-table .bpbb-status-badge:not(.hidden)::before {
        content: "✓";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        background: #28a745;
        color: white;
        border-radius: 50%;
        font-weight: bold;
        font-size: 14px;
    }
    
    /* Default text for mobile - will be overridden by context-specific rules */
    #bpbb-attendees-table .bpbb-status-badge:not(.hidden)::after {
        font-size: 0.75rem;
        color: #28a745;
        font-weight: 500;
    }
}

/* Actions - Mobile: Icon-only buttons */
.bpbb-attendee-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    /* Certificate button - full width on mobile */
    .bpbb-attendee-certificate {
        width: 100%;
        order: -1; /* Show first */
    }
    
    .bpbb-attendee-certificate a {
        width: 100%;
    }
    
    .bpbb-attendee-certificate button {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    /* Edit and Delete - icon only */
    .bpbb-edit-attendee:not(.bpbb-attendee-certificate *),
    .bpbb-delete-attendee {
        padding: 0.5rem;
        min-width: 40px;
        height: 40px;
        flex: 0 0 auto;
    }
    
    /* Hide button text, keep icons */
    .bpbb-edit-attendee:not(.bpbb-attendee-certificate *)::after,
    .bpbb-delete-attendee::after {
        content: none;
    }
    
    .bpbb-edit-attendee i,
    .bpbb-delete-attendee i {
        margin: 0;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .bpbb-attendee-actions {
        width: auto;
        flex-wrap: nowrap;
    }
    
    .bpbb-attendee-certificate {
        order: 0;
    }
}

.bpbb-attendees-list > * {
    min-width: 0; /* Prevent flex items from overflowing */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure inputs don't overflow on mobile */
.bpbb-attendees-list input[type="text"],
.bpbb-attendees-list input[type="email"],
.bpbb-attendees-list select,
.bpbb-attendees-list textarea {
    max-width: 100%;
    box-sizing: border-box;
}

/* Add Attendee Section - Mobile responsive */
.bpbb-add-attendee-section {
    margin-top: 1.5rem;
}

.bpbb-add-attendee-form .tutor-row {
    margin: 0 -0.5rem;
}

.bpbb-add-attendee-form .tutor-col-md-6 {
    padding: 0 0.5rem;
}

@media (max-width: 767px) {
    .bpbb-add-attendee-form .tutor-col-md-6 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .bpbb-add-attendee-form .tutor-d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bpbb-add-attendee-form button {
        width: 100%;
        margin: 0 !important;
    }
    
    .bpbb-toggle-add-form {
        width: 100%;
    }
}

/* Responsive tables/lists inside modal */
.modal-content table {
    width: 100%;
    table-layout: auto;
    min-width: unset !important;
}

/* Mobile: Transform attendees table into cards */
@media (max-width: 767px) {
    #bpbb-attendees-table .tutor-table{
        min-width: auto !important;
    }
    #bpbb-attendees-table {
    
        display: block;
        border: none;
        background: transparent !important;
    }
    
    #bpbb-attendees-table thead {
        display: none;
    }
    
    #bpbb-attendees-table tbody {
        display: block;
        background: transparent !important;
    }
    
    #bpbb-attendees-table tr.bpbb-attendee-row {
        display: block;
        margin-bottom: 1.25rem;
        padding: 1.25rem;
        background: #ffffff !important;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        border-left: 4px solid #009ae1 !important;
        position: relative;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: none !important;
    }
    
    /* Remove hover effects on mobile cards */
    #bpbb-attendees-table tr.bpbb-attendee-row:hover {
        background: #ffffff !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
        cursor: default;
    }
    
    #bpbb-attendees-table td {
        display: block;
        text-align: left;
        padding: 0.25rem 0 !important;
        border: none !important;
        background: transparent !important;
    }
    
    /* Remove striped/zebra background from table rows */
    #bpbb-attendees-table tbody tr:nth-child(odd),
    #bpbb-attendees-table tbody tr:nth-child(even) {
        background: transparent !important;
    }
    
    /* Attendee name - prominent */
    #bpbb-attendees-table td:nth-child(1) {
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    /* Email - with icon */
    #bpbb-attendees-table td:nth-child(2) {
        color: #666;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    #bpbb-attendees-table td:nth-child(2)::before {
        content: "✉ ";
        color: #009ae1;
    }
    
    /* Zoom participated - context-specific text for mobile */
    #bpbb-attendees-table td:nth-child(3) {
        display: block;
        margin: 0.5rem 0;
    }
    
    #bpbb-attendees-table td:nth-child(3) .bpbb-status-badge:not(.hidden)::after {
        content: " Zoom Link angeklickt";
    }
    
    /* Certificate URL - compact button */
    #bpbb-attendees-table td:nth-child(4) {
        display: inline-block;
        margin: 0.5rem 0.5rem 0.5rem 0;
        vertical-align: middle;
    }
    
    #bpbb-attendees-table td:nth-child(4) a button {
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* Certificate sent - context-specific text for mobile */
    #bpbb-attendees-table td:nth-child(5) {
        display: inline-block;
        margin: 0.5rem 0;
        vertical-align: middle;
    }
    
    #bpbb-attendees-table td:nth-child(5) .bpbb-status-badge:not(.hidden)::after {
        content: " TNB versendet";
    }
    
    /* Check-in button - full width at bottom */
    #bpbb-attendees-table td:nth-child(6) {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #dee2e6;
        display: block;
    }
    
    #bpbb-attendees-table td:nth-child(6) button {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (min-width: 768px) {
    .modal-content table {
        font-size: 0.9rem;
    }
    
    /* Card header responsive */
    .tutor-card-header {
        padding: 0.75rem 0;
    }
    
    .tutor-card-header h4 {
        font-size: 1.125rem !important;
    }
    
    .tutor-card-header p {
        font-size: 0.875rem;
    }
}

/** Edit attendees hover icon overlay */
.bpbb-course-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
}

.bpbb-edit-attendees-overlay, .bpbb-checkin-attendee-overlay{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.bpbb-course-thumbnail-wrapper:hover .bpbb-edit-attendees-overlay, 
.bpbb-course-thumbnail-wrapper:hover .bpbb-checkin-attendee-overlay {
    opacity: 1;
}

.bpbb-edit-attendees-overlay .dashicons,
.bpbb-checkin-attendee-overlay .dashicons {
    color: #fff;
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.bpbb-edit-attendees-overlay .description,
.bpbb-checkin-attendee-overlay .description {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.bpbb-edit-attendees-btn{
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: var( --e-global-color-accent );
    color: var( --e-global-color-d6cea4e );
    border: 1px solid var( --e-global-color-accent );
    border-radius: 5px;
    cursor: pointer;
}

.bpbb-edit-attendees-btn:hover{
    background-color: var( --e-global-color-d6cea4e );
    color: var( --e-global-color-accent );
}

/** course loop / course filter modifications **/
.tutor-meta.tutor-instructor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
  }
  
  .tutor-meta.tutor-instructor > div:nth-child(1),
  .tutor-meta.tutor-instructor > div:nth-child(4) {
    flex: 0 0 20%;
    box-sizing: border-box;
  }
  
  .tutor-meta.tutor-instructor > div:nth-child(2),
  .tutor-meta.tutor-instructor > div:nth-child(5) {
    flex: 0 0 calc( 80% - 16px );
    box-sizing: border-box;
  }
  

  .tutor-meta.tutor-instructor > div:nth-child(3) {
    flex: 0 0 100%;
    text-align: center;  /* optional: „und“ zentriert anzeigen */
  }
  

/** single course modifications **/
.bpbb-instructor-wrap {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    flex: 2;
}

/** tribe events modifications **/

.tribe-tickets__form-field-label {
    font-weight: bold!important;
    margin: 0.5rem 0!important;
}

.event-tickets .tribe-tickets__form .tribe-tickets__form-field{
    padding-bottom: 1rem!important;
}