/* DBC Spaceshuttle Plugin Styles */

.dbc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dbc-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.dbc-month-group {
    margin-bottom: 30px;
}

.dbc-month-group h4 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.dbc-table-responsive {
    overflow-x: auto;
}

.dbc-table {
    width: 100%;
    border-collapse: collapse;
}

.dbc-table th, .dbc-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dbc-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.dbc-table .dbc-name-col {
    white-space: nowrap !important;
    min-width: 200px !important;
    width: 30% !important;
}

.dbc-table th.dbc-sortable {
    cursor: pointer;
    position: relative;
}

.dbc-table th.dbc-sortable:hover {
    background-color: #f0f0f1;
}

.dbc-sort-icon {
    font-size: 10px;
    margin-left: 5px;
}

.dbc-table a {
    color: #5a77b9;
    text-decoration: none;
    font-weight: 600;
}

.dbc-table a:hover {
    text-decoration: underline;
}

.dbc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.dbc-badge-success {
    background-color: #d4edda;
    color: #155724;
}

.dbc-badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.dbc-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dbc-btn-success {
    background-color: #28a745;
    color: white;
}

.dbc-btn-danger {
    background-color: #dc3545;
    color: white;
}

.dbc-btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.dbc-btn-info {
    background-color: #17a2b8;
    color: white;
}

/* Icon Buttons */
.dbc-status-icons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.dbc-icon-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #ccc;
}

.dbc-icon-btn:hover {
    background: #e0e0e0;
    color: #999;
}

.dbc-icon-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Active States */
.dbc-icon-btn.dbc-btn-yes.active {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.dbc-icon-btn.dbc-btn-no.active {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.dbc-icon-btn.dbc-btn-reset.active {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.dbc-icon-btn.dbc-btn-maybe.active {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.dbc-icon-btn.dbc-btn-bitterballen.active {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Hover States for Active */
.dbc-icon-btn.dbc-btn-yes:hover {
    color: #155724;
    background-color: #c3e6cb;
}

.dbc-icon-btn.dbc-btn-no:hover {
    color: #721c24;
    background-color: #f5c6cb;
}

.dbc-icon-btn.dbc-btn-maybe:hover {
    color: #856404;
    background-color: #ffeeba;
}

.dbc-icon-btn.dbc-btn-bitterballen:hover {
    color: #0c5460;
    background-color: #bee5eb;
}

/* Modal Styles */
.dbc-modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.dbc-modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dbc-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.dbc-close:hover,
.dbc-close:focus {
    color: black;
    text-decoration: none;
}

.dbc-presence-group {
    margin-bottom: 20px;
}

.dbc-presence-group h4 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.dbc-presence-group.dbc-coming h4 {
    color: #28a745;
    border-bottom-color: #28a745;
}

.dbc-presence-group.dbc-not-coming h4 {
    color: #dc3545;
    border-bottom-color: #dc3545;
}

.dbc-presence-group.dbc-not-responded h4 {
    color: #ffc107;
    border-bottom-color: #ffc107;
}

.dbc-presence-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dbc-presence-list li {
    padding: 5px 0;
    border-bottom: 1px solid #f9f9f9;
}

.dbc-error {
    color: #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.dbc-login-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
}

/* Login Form Styles */
.dbc-login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.dbc-login-form p {
    margin-bottom: 20px;
}

.dbc-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #24292e;
    font-size: 14px;
}

.dbc-login-form input[type="text"],
.dbc-login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dbc-login-form input[type="text"]:focus,
.dbc-login-form input[type="password"]:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
}

.dbc-login-form .login-remember {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.dbc-login-form .login-remember label {
    display: inline-block;
    margin-bottom: 0;
    font-weight: normal;
    color: #586069;
    cursor: pointer;
}

.dbc-login-form .login-remember input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.dbc-login-form .login-submit {
    margin-top: 20px;
}

.dbc-login-form .button-primary {
    display: block;
    width: 100%;
    background-color: #2ea44f;
    border: 1px solid rgba(27, 31, 35, 0.15);
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s;
}

.dbc-login-form .button-primary:hover {
    background-color: #2c974b;
}

/* Registration Form Styles */
.dbc-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.dbc-registration-form h3 {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.dbc-registration-form p {
    margin-bottom: 20px;
}

.dbc-registration-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #24292e;
    font-size: 14px;
}

.dbc-registration-form input[type="text"],
.dbc-registration-form input[type="email"],
.dbc-registration-form input[type="date"],
.dbc-registration-form input[type="tel"],
.dbc-registration-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dbc-registration-form input[type="text"]:focus,
.dbc-registration-form input[type="email"]:focus,
.dbc-registration-form input[type="date"]:focus,
.dbc-registration-form input[type="tel"]:focus,
.dbc-registration-form textarea:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
}

.dbc-registration-form input[type="radio"] {
    margin-right: 8px;
    margin-top: 2px;
    vertical-align: text-top;
}

.dbc-registration-form label:has(input[type="radio"]) {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
    cursor: pointer;
}

/* Fallback for browsers not supporting :has() */
/* General label styling already applied */

/* Specific fix for radio button labels which contain the input */
.dbc-registration-form p label:not([for]) {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    font-weight: normal;
    margin-bottom: 5px;
}

.dbc-fees-info {
    background-color: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 20px 0;
}

.dbc-fees-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #007cba;
}

.dbc-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

/* Profile Photo Thumbnail */
.dbc-member-photo-thumb {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Profile Photo on Profile Page */
.dbc-profile-photo {
    border-radius: 50%;
    width: 96px;
    height: 96px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dbc-profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.dbc-profile-photo-preview {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 4px;
}

/* Mobile Dashboard Styles */
@media screen and (max-width: 768px) {
    .dbc-table thead {
        display: none;
    }

    .dbc-table, 
    .dbc-table tbody, 
    .dbc-table tr, 
    .dbc-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .dbc-table tr {
        background: #fff;
        margin-bottom: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        padding: 15px;
        position: relative;
        border: 1px solid #eee;
    }

    .dbc-table td {
        padding: 5px 0;
        border: none;
        text-align: left;
    }

    /* Date Styling */
    .dbc-date-cell {
        margin-bottom: 5px;
    }

    .dbc-date-wrapper {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .dbc-day {
        font-weight: 700;
        font-size: 1.1em;
        color: #2c3e50;
        text-transform: capitalize;
    }

    .dbc-date {
        color: #666;
        font-weight: 500;
    }

    /* Time Styling */
    .dbc-time-cell {
        margin-bottom: 15px;
        padding-bottom: 15px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .dbc-time {
        font-weight: 600;
        color: #2c3e50;
        display: block;
        margin-bottom: 4px;
    }
    
    .dbc-time::before {
        content: "\f469"; /* dashicons-clock */
        font-family: "dashicons";
        margin-right: 5px;
        vertical-align: middle;
        color: #888;
    }

    .dbc-description {
        font-size: 0.9em;
        color: #666;
        margin-top: 4px;
    }

    /* Buttons Grid */
    .dbc-status-icons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .dbc-icon-btn {
        width: 100%;
        height: auto;
        padding: 12px 10px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 600;
        font-size: 14px;
        background-color: #f8f9fa;
        color: #555;
        border: 1px solid #e9ecef;
    }

    .dbc-icon-btn::after {
        content: attr(title);
    }
    
    .dbc-icon-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    /* Active States for Mobile Buttons */
    .dbc-icon-btn.active {
        border-width: 1px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    /* Details Button */
    .dbc-table td:last-child {
        position: absolute;
        top: 15px;
        right: 15px;
        width: auto;
        padding: 0;
    }

    .dbc-view-details {
        background: transparent;
        color: #007cba;
        padding: 5px;
        font-size: 0; /* Hide text "Details" */
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dbc-view-details::before {
        content: "\f227"; /* dashicons-info */
        font-family: "dashicons";
        font-size: 24px;
        color: #ccc;
    }
}

/* Commissions Page Styles */
.dbc-commissions-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dbc-board-section {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eef2f7;
}

.dbc-board-section h3, 
.dbc-commission-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.4em;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.dbc-commissions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .dbc-commissions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dbc-commission-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eef2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dbc-commission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.dbc-commission-email {
    margin-bottom: 15px;
    font-size: 0.95em;
}

.dbc-commission-email a {
    color: #3498db;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dbc-commission-email a:hover {
    text-decoration: underline;
}

.dbc-member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dbc-member-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f7fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: #4a5568;
}

.dbc-member-list li:last-child {
    border-bottom: none;
}

.dbc-member-role {
    font-weight: 600;
    color: #2d3748;
    margin-right: 10px;
}

.dbc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dbc-badge-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Menu Item Hiding - CSS-based to preserve menu structure for JavaScript */
/* These classes are added in WordPress menu editor to hide items based on user role */

/* Hide items marked with dbc-hide-member for logged-in members */
body.logged-in.dbc-member .menu-item.dbc-hide-member,
/* Also hide for guests (not logged in) */
body:not(.logged-in) .menu-item.dbc-hide-member {
    display: none !important;
}

/* Hide items marked with dbc-hide-events-manager for event managers */
body.logged-in.dbc-event-manager .menu-item.dbc-hide-events-manager {
    display: none !important;
}

/* Hide items marked with dbc-hide-manager for managers */
body.logged-in.dbc-manager .menu-item.dbc-hide-manager {
    display: none !important;
}

/* Commissions Manager Mobile Styles */
@media screen and (max-width: 768px) {
    /* Board Section - Already mobile-friendly with div structure */
    .dbc-board-item select {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Commission Cards - Header with order, name, delete */
    .dbc-commissions-list .dbc-card > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .dbc-commissions-list .dbc-card > div:first-child > div {
        width: 100% !important;
        margin-bottom: 10px;
        flex-direction: row !important;
        gap: 10px !important;
    }

    .dbc-commissions-list .dbc-card > div:first-child > div input[type="number"] {
        width: 70px !important;
        flex-shrink: 0;
    }

    .dbc-commissions-list .dbc-card > div:first-child > div input[type="text"] {
        flex: 1 !important;
        width: auto !important;
    }

    .dbc-commissions-list .dbc-card > div:first-child button {
        width: 100%;
        margin-top: 0;
    }

    /* Email input full width */
    .dbc-commissions-list .dbc-card input[type="email"] {
        width: 100% !important;
    }

    /* Members list */
    .dbc-commissions-list .dbc-card ul li {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px 0 !important;
    }

    .dbc-commissions-list .dbc-card ul li button {
        margin-top: 8px;
        width: 100%;
    }

    /* Add member section */
    .dbc-commissions-list .dbc-card > div:last-of-type {
        flex-direction: column !important;
    }

    .dbc-commissions-list .dbc-card > div:last-of-type select {
        width: 100% !important;
        margin-bottom: 10px;
    }

    .dbc-commissions-list .dbc-card > div:last-of-type button {
        width: 100%;
    }

    /* New commission form */
    .dbc-card > div[style*="flex"] {
        flex-direction: column !important;
    }

    .dbc-card > div[style*="flex"] input[type="text"] {
        width: 100% !important;
        min-width: 100% !important;
        margin-bottom: 10px;
    }

    .dbc-card > div[style*="flex"] button {
        width: 100%;
    }
}


