/* 
 * Dation Connection Plugin Styles
 * Optimized unified CSS file
 */

/* ======================
   COMMON STYLES
   ====================== */

/* Base button styles */
.course-button,
.dation-button {
    background: linear-gradient(to left, #175f92 50%, #ffdd00 50%) right;
    background-size: 202%;
    transition: .3s ease-out;
    color: #ffffff;
    padding: 4px 24px;
    border-radius: 25px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
    width: fit-content;
    font-size:16px;
}

.course-button:hover,
.dation-button:hover {
    background-position: left;
    color: #6f6f6e;
    text-decoration: none;
}

.course-register-button.remove,
.course-button.remove {
    background: linear-gradient(to left, #dc3545 50%, #ffc107 50%) right;
    background-size: 202%;
}

.course-register-button:disabled,
.course-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Spinner for loading */
.course-register-button i,
.course-button i {
    margin-right: 8px;
    display: none;
}

.course-register-button.loading i,
.course-button.loading i {
    display: inline-block;
}

/* Theme classes */
.dation-light-theme {
    color: inherit;
    font-family: inherit;
}

.dation-dark-theme {
    color: #ffffff;
    font-family: inherit;
}

/* Error messaging */
.dation-error,
.course-error,
.api-error {
    background: #f8d7da;
    color: #721c24;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 16px 0;
    text-align: center;
}

.dation-no-courses,
.no-courses {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Availability badges */
.availability-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.availability-high {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.availability-low {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.availability-full {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ======================
   LEGACY COURSE STYLES
   ====================== */

.course-date-container-header {
    font-weight: bold;
    font-size: 26px;
    line-height: normal;
    color: #ffffff;
    margin-bottom: 20px;
}

.single-part-row {
    color: #ffffff;
}

.parts-table {
    background: #485685;
    padding: 25px;
    transition: 0.5s;
    margin-bottom: 20px;
    border-radius: 5px;
    display: none;
    position: relative;
    overflow: hidden;
    border: 1px solid #485685;
}

.parts-table:hover {
    border-color: #ffdd04;
}

.parts-table::after {
    content: "";
    height: 150px;
    width: 150px;
    background-color: #FFDD00;
    border-radius: 50%;
    bottom: -25px;
    left: -50px;
    border: 1px solid #FFDD00;
    filter: blur(70px);
    position: absolute;
    opacity: 0;
    transition: 0.5s;
    z-index: 0;
}

.parts-table:hover::after {
    opacity: 1;
}

.parts-table-column {
    z-index: 99;
    position: inherit;
}

#loadMore {
    background: linear-gradient(to left, #175f92 50%, #ffdd00 50%) right;
    background-size: 202%;
    transition: .3s ease-out;
    color: #ffffff;
    cursor: pointer;
    width: fit-content;
    padding: 5px 29px;
    border-radius: 20px;
    margin-top: 15px;
    text-decoration: none;
}

#loadMore:hover {
    background-position: left;
    color: #6f6f6e;
}

.noContent {
    display: none;
}

/* ======================
   CART STYLES
   ====================== */

.custom-cart-table {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

.custom-cart-table-head {
    color: #fff;
}
.custom-cart-table td,
.custom-cart-table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.custom-cart-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.custom-cart-table tr:nth-child(odd) {
    background-color: #fff;
}

.custom-cart-table tr:hover {
    background-color: #ddd;
}

.custom-cart-table td {
    color: #000;
}

.custom-cart-table th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #175f92;
    color: white;
}

.current-dation-cart.live-cart {
    color: #ffffff;
}

.off-canvas-content .cart-finish-button {
    display: none;
}

/* ======================
   MODAL STYLES
   ====================== */

.custom-cart-modal,
.course-popup-modal {
    display: none;
    position: fixed;
    z-index: 9999999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.custom-cart-modal {
    padding-top: 40vh;
}

.custom-cart-modal-content {
    margin: auto;
    background: #485685;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    color: #ffffff;
    text-align: center;
}

.custom-cart-text {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.course-popup-content {
    background-color: #fff;
    margin: 200px auto 100px;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.course-popup-close {
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
}

.custom-cart-close-modal {
    min-width: 140px;
    padding: 12px 24px;
    border-radius: 25px;
    background: linear-gradient(to left, #175f92 50%, #ffdd00 50%) right;
    background-size: 202%;
    transition: .3s ease-out;
    color: #ffffff;
    display: inline-block;
    font-weight: bold;
    cursor: pointer;
    border: none;
    text-decoration: none;
    margin-top: 10px;
}

.custom-cart-close-modal:hover {
    background-position: left;
    color: #6f6f6e;
}

/* ======================
   PLANNING TABLE STYLES
   ====================== */

.planning-light-theme,
.planning-dark-theme {
    width: 100%;
}

.planning-light-theme table,
.planning-dark-theme table {
    background-color: transparent;
    width: 100%;
    border: 1px solid;
}

.planning-light-theme table { 
    border-color: #dee2e6; 
}

.planning-dark-theme table { 
    border-color: rgba(255,255,255,0.2); 
}

.planning-light-theme table thead th {
    background-color: rgba(0,0,0,0.05);
    color: #333333;
    border-color: #dee2e6;
    padding: 12px 8px;
    font-weight: bold;
}

.planning-dark-theme table thead th {
    background-color: rgba(0,0,0,0.4);
    color: #ffffff;
    border-color: rgba(255,255,255,0.2);
    padding: 12px 8px;
    font-weight: bold;
}

.planning-light-theme table tbody tr {
    background-color: transparent;
    color: inherit;
}

.planning-dark-theme table tbody tr {
    background-color: rgba(0,0,0,0.2);
    color: #ffffff;
}

.planning-light-theme table tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.05);
}

.planning-dark-theme table tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.4);
}

.planning-light-theme table tbody tr:hover {
    background-color: rgba(0,0,0,0.1);
}

.planning-dark-theme table tbody tr:hover {
    background-color: rgba(0,0,0,0.6);
}

.planning-light-theme table tbody td,
.planning-dark-theme table tbody td {
    padding: 10px 8px;
}

.planning-light-theme table tbody td {
    border-color: #dee2e6;
}

.planning-dark-theme table tbody td {
    border-color: rgba(255,255,255,0.1);
}

/* Date search filters */
.datesearch {
    float: right;
    margin-bottom: 20px;
    background: none;
}

.datesearch td {
    padding: 5px 10px;
    background: none;
    border: none;
}

.planning-light-theme .datesearch td {
    color: inherit;
}

.planning-dark-theme .datesearch td {
    color: #ffffff;
}

/* Form controls */
.planning-light-theme input[type="search"],
.planning-light-theme input[type="text"],
.planning-light-theme select {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    border-radius: 4px;
}

.planning-dark-theme input[type="search"],
.planning-dark-theme input[type="text"],
.planning-dark-theme select {
    background-color: #495057;
    color: #ffffff;
    border: 1px solid #6c757d;
    padding: 8px 12px;
    border-radius: 4px;
}

/* ======================
   SINGLE COURSE STYLES
   ====================== */

.single-course-light .course-container,
.single-course-dark .course-container {
    margin: 20px 0;
    border-radius: 8px;
    padding: 24px;
}

.single-course-light .course-container {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.single-course-dark .course-container {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.single-course-light .course-title,
.single-course-dark .course-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
}

.single-course-light .course-title {
    color: #2c3e50;
}

.single-course-dark .course-title {
    color: #ffffff;
}

.single-course-light .course-meta,
.single-course-dark .course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.single-course-light .meta-item {
    background: rgba(0,0,0,0.03);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #175f92;
}

.single-course-dark .meta-item {
    background: rgba(255,255,255,0.05);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #175f92;
}

.single-course-light .meta-label,
.single-course-dark .meta-label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.single-course-light .meta-label {
    color: #6c757d;
}

.single-course-dark .meta-label {
    color: #adb5bd;
}

.single-course-light .meta-value,
.single-course-dark .meta-value {
    font-size: 16px;
}

.single-course-light .meta-value {
    color: #333333;
}

.single-course-dark .meta-value {
    color: #ffffff;
}

/* Compact layout */
.single-course-compact .course-container-compact {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    background: rgba(72, 86, 133, 0.1);
    border: 1px solid rgba(72, 86, 133, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.single-course-compact .course-container-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.single-course-compact .time-slot {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
}

.single-course-compact .course-actions-compact {
    text-align: center;
    margin-top: 16px;
}

.single-course-compact .course-button {
    width: 100%;
}

/* ======================
   COURSE GROUPS STYLES
   ====================== */

.course-groups {
    width: 100%;
}

.course-groups-header {
    margin-bottom: 24px;
    text-align: center;
}

.course-groups-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.course-groups-subtitle {
    font-size: 16px;
    margin-bottom: 16px;
    color: #6c757d;
}

.groups-container.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.groups-container.list {
    display: block;
}

.group-card.cards {
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.group-card.cards:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.group-card.list {
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* ======================
   DATATABLES OVERRIDES
   ====================== */

.planning-light-theme .dataTables_wrapper,
.planning-dark-theme .dataTables_wrapper {
    margin-top: 20px;
}

.planning-light-theme .dataTables_wrapper {
    color: #333333;
}

.planning-dark-theme .dataTables_wrapper {
    color: #ffffff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active {
    background: #175f92 !important;
    border-color: #175f92 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active a {
    color: #ffffff !important;
}

/* Modal text and buttons */
.custom-cart-text {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.custom-cart-modal .modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .custom-cart-modal .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-cart-close-modal,
    .cart-finish-button {
        width: 100%;
        min-width: auto;
    }
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */

@media (max-width: 768px) {
    .single-course-light .course-meta,
    .single-course-dark .course-meta {
        grid-template-columns: 1fr;
    }
    
    .groups-container.cards {
        grid-template-columns: 1fr;
    }
    
    .single-course-compact .course-container-compact {
        max-width: 100%;
        margin: 10px 0;
        padding: 16px;
    }
    
    .datesearch {
        float: none;
        margin: 0 auto 20px auto;
    }
}


.full-width {
    width: 100%;
}
.bedrijfsgegevens-fields {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.checkout-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.checkout-cart-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.checkout-cart-section h4,
.checkout-form-section h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

/* ======================
   CF7 FORM STYLES  
   ====================== */

/* Form container */
.checkout-form .wpcf7 {
    color: #ffffff;
}

.checkout-form .wpcf7-form {
    max-width: 100%;
    padding: 0;
}

/* Form rows */
.checkout-form .form-row {
    margin-bottom: 16px;
    clear: both;
}

.checkout-form .two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Labels */
.checkout-form label {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.2;
}

/* Input fields - более компактные */
.checkout-form input[type="text"],
.checkout-form input[type="email"], 
.checkout-form input[type="tel"],
.checkout-form input[type="date"],
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    color: #333333;
    font-size: 13px;
    box-sizing: border-box;
    font-family: inherit;
    height: auto;
}

.checkout-form input[type="text"]:focus,
.checkout-form input[type="email"]:focus,
.checkout-form input[type="tel"]:focus,
.checkout-form input[type="date"]:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    border-color: #175f92;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(23,95,146,0.2);
}

/* Select dropdown */
.checkout-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23333333' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 35px;
}

/* Textarea */
.checkout-form textarea {
    min-height: 70px;
    resize: vertical;
    line-height: 1.4;
}

/* Radio buttons and checkboxes */
.checkout-form .wpcf7-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.checkout-form .wpcf7-list-item {
    margin: 6px 0;
    padding: 6px 0;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.checkout-form .wpcf7-list-item input[type="radio"],
.checkout-form .wpcf7-list-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.checkout-form .wpcf7-list-item label {
    margin: 0;
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.3;
    flex: 1;
}

/* Bedrijfsgegevens section */
.checkout-form .bedrijfsgegevens-fields {
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 6px;
    margin: 16px 0;
    border: 1px solid rgba(255,255,255,0.15);
}

.checkout-form .bedrijfsgegevens-fields h3 {
    color: #ffffff;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 16px;
}

/* Section headings */
.checkout-form h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

.checkout-form h3:first-child {
    margin-top: 0;
}

/* Submit button */
.checkout-form input[type="submit"],
.checkout-form .wpcf7-submit {
    background: linear-gradient(to left, #175f92 50%, #ffdd00 50%) right;
    background-size: 202%;
    transition: .3s ease-out;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    border: none;
    font-weight: bold;
    font-size: 14px;
    margin-top: 20px;
    min-width: 140px;
}

.checkout-form input[type="submit"]:hover,
.checkout-form .wpcf7-submit:hover {
    background-position: left;
    color: #6f6f6e;
}

/* Error and success messages */
.checkout-form .wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 11px;
    margin-top: 3px;
    display: block;
}

.checkout-form .wpcf7-validation-errors {
    background: rgba(255,107,107,0.15);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 13px;
}

.checkout-form .wpcf7-mail-sent-ok {
    background: rgba(76,175,80,0.15);
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-form .two-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .checkout-modal-content {
        padding: 16px;
    }
    
    .checkout-form .form-row {
        margin-bottom: 12px;
    }
    
    .checkout-form .bedrijfsgegevens-fields {
        padding: 16px;
        margin: 12px 0;
    }
}