/* Dashboard Wrapper */
.wpfub-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* Header */
.wpfub-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpfub-btn-primary {
    background-color: #1F473F; /* Matching the button color */
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 400;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

/* Table Styling */
/* Table */
.wpfub-table {
    width: 100%;
    margin-bottom: 0 !important;
    border-collapse: collapse;
}

.wpfub-table th {
    background: #1F473F; /* Header Blue */
    color: #fff;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 15px 20px;
    text-align: left;
}

/* Table Header (The Blue Bar) */
.wpfub-table thead tr {
    background-color: #1F473F; /* Lighter blue from image header */
    color: #fff;
    text-align: left;
}

/* Table Body */
.wpfub-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}

.wpfub-table tbody tr:last-child {
    border-bottom: none;
}

.wpfub-table tbody tr:hover {
    background-color: #FFFAE3;
}

.wpfub-table td {
    color: #1F473F;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.wpfub-table tr:last-child td {
    border-bottom: none;
}

/* Action Buttons (Sessions & Edit) */
.wpfub-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpfub-btn-session {
    background-color: #fff;
    border: 1px solid #1F473F;
    color: #1F473F !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 400;
}
.wpfub-btn-session:hover {
    color: #1F473F !important;
    background-color: #FFFAE3 !important;
}

.wpfub-btn-edit {
    background: none;
    border: none;
    color: #1F473F;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
}

.wpfub-btn-edit:hover {
    color: #555;
}

.wpfub-tags-section ul {
    margin-left: 0;
}

.wpfub-tags-section form {
    margin-bottom: 0;
}

/* --- Modal Styles (New) --- */
.wpfub-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999999;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(33, 43, 54, 0.6); /* Backdrop color */
    backdrop-filter: blur(2px);
}

.wpfub-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px; /* Rounded corners like image */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 800px !important;
    height: ;
    max-width: 90%;
    position: relative;
    animation: wpfubFadeIn 0.3s;
}

#wpfub-date-picker-modal .wpfub-modal-content {
    width: 400px !important;
}

@keyframes wpfubFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.wpfub-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1F473F !important;
}

.wpfub-modal-header h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: 24px;
    line-height: 1em !important;
}

.wpfub-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.wpfub-close:hover {
    color: #000;
}

.wpfub-modal-body {
    height: auto !important;
    padding: 30px;
    background: #f9fafb; /* Light gray background for form area */
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* --- Form Elements (Matches Image) --- */
.wpfub-form-group {
    margin-bottom: 20px;
}

.wpfub-input-label {
    display: none; /* Hidden label design style (placeholder focused) */
}

/* Form Elements */
.wpfub-input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    color: #1F473F !important;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.wpfub-modal .wpfub-input-field::-webkit-input-placeholder {
    color: #1F473F !important;
    opacity: 0.6 !important;
}
.wpfub-modal .wpfub-input-field::-moz-placeholder {
    color: #1F473F !important;
    opacity: 0.6 !important;
}
.wpfub-modal .wpfub-input-field:-ms-input-placeholder {
    color: #1F473F !important;
    opacity: 0.6 !important;
}
.wpfub-modal .wpfub-input-field::placeholder {
    color: #1F473F !important;
    opacity: 0.6 !important;
}

.wpfub-input-field:focus {
    border-color: #34495e;
    outline: none;
    box-shadow: 0 0 0 1px #34495e;
}

#wpfub-new-user-email {
    width: calc(100% - 42px);
}

/* --- FIX: ROLE DROPDOWN STYLING --- */
select.wpfub-input-field {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231F473F%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 30px;
    cursor: pointer;
    line-height: 1.5;
}

.wpfub-btn-submit {
    width: 100%;
    padding: 15px;
    background-color: #1F473F;
    color: white;
    border: none;
    border-radius: 25px; /* Pill shaped button */
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.wpfub-btn-submit:hover {
    background-color: #1F473F;
}

/* Settings Page Styles */
.wpfub-settings-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    margin-top: 20px;
    border-radius: 8px;
}
.wpfub-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

/* Footer / Pagination Area */
.wpfub-footer {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e6ed;
    color: #666;
    font-size: 14px;
}

/* --- Session Grid Styles --- */
.wpfub-session-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 columns layout */
    gap: 10px; /* Vertical gap 20px, Horizontal gap 10px */
    margin: 20px 0;
}

.wpfub-session-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wpfub-close-session {
    display: block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    cursor: pointer;
    text-align: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
}

.wpfub-session-group-wrapper h3 {
    font-size: 24px !important;
}

/* Session Number (1, 2, 3...) */
.wpfub-session-number {
    font-size: 16px;
    font-weight: 500;
    color: #1F473F;
    min-width: 20px;
    text-align: right;
}

/* Custom Checkbox Container */
.wpfub-session-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Hide default input */
.wpfub-session-checkbox input {
    opacity: 0 !important;
    width: 0;
    height: 0;
}

/* Create custom square box */
.wpfub-session-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #d3dce6; /* Grey when unchecked */
    border-radius: 6px; /* Rounded corners */
    transition: all 0.2s ease;
}

/* Hover Effect */
.wpfub-session-checkbox:hover input ~ .wpfub-session-checkmark {
    background-color: #c0c9d6;
}

/* Checked State (Blue) */
.wpfub-session-checkbox input:checked ~ .wpfub-session-checkmark {
    background-color: #1F473F; /* Matching theme blue */
}

/* Disabled State (Faded) */
.wpfub-session-checkbox input:disabled ~ .wpfub-session-checkmark {
    background-color: #eef2f7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Check Icon */
.wpfub-session-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.wpfub-session-checkbox input:checked ~ .wpfub-session-checkmark:after {
    display: block;
}

/* Draw white checkmark */
.wpfub-session-checkbox .wpfub-session-checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Container for Star + Checkbox */
.wpfub-session-item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Star Icon */
.wpfub-date-trigger {
    font-size: 18px;
    color: #ccc; /* Default grey */
    cursor: pointer;
    margin-bottom: 2px;
    line-height: 1;
    transition: color 0.2s;
}

.wpfub-date-trigger:hover {
    color: #f39c12; /* Orange hover */
}

.wpfub-date-trigger.has-date {
    color: #f39c12; /* Gold/Orange when active */
}

.wpfub-session-form h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

/* --- Auto Email Generator Styles --- */
.wpfub-email-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.wpfub-email-wrapper input[type="email"] {
    flex-grow: 1;
    min-width: 0;
}

.wpfub-auto-email-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    background-color: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334e68;
    transition: all 0.2s ease;
}

/* Hover Effect */
.wpfub-auto-email-btn:hover {
    border-color: #334e68;
    color: #ffffff;
}

.wpfub-auto-email-btn svg {
    width: 20px !important;
    height: 20px !important;
    display: block;
    pointer-events: none;
}

.wpfub-status-count {
    color: #fff;
    font-weight: 800;
    font-size: 32px;
}

.wpfub-edit-back {
    color: #1F473F !important;
}

/* --- Pagination Styles (Green Theme, Inside Footer) --- */
.wpfub-pagination {
    display: flex;
    gap: 5px;
    margin: 0; /* Reset margin to fit in footer */
}

.wpfub-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 5px;
    border: 1px solid #1F473F;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    color: #1F473F;
    background-color: #fff;
    transition: all 0.2s ease;
}

.wpfub-page-link:hover {
    background-color: #e8f5e9; /* Light green hover */
    border-color: #1F473F;
    color: #1F473F;
}

.wpfub-page-link.current {
    background-color: #1F473F;
    color: #fff;
    border-color: #1F473F;
    pointer-events: none;
}

.wpfub-page-link.disabled {
    opacity: 0.5;
    cursor: default;
    border-color: #ccc;
    color: #999;
}

.wpfub-page-link.dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #666;
    padding: 0 2px;
    min-width: auto;
}

.wpfub-page-link.dots:hover {
    background: transparent;
    border: none;
    color: #666;
}

/* Optional: Make pagination buttons slightly more rounded like the reference image */
.wpfub-page-link {
    border-radius: 6px; /* Increased from 4px */
}

/* Adjust font size for chevron arrows */
.wpfub-page-link {
    font-size: 16px; /* Slightly larger text */
    line-height: 1;
}

/* --- Search Box Styles (Pill Shape) --- */
.wpfub-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.wpfub-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;
    display: flex;
    z-index: 20;
}

.wpfub-search-input {
    /* Updated Padding: Added 35px to right side for reset button */
    padding: 10px 35px 10px 45px !important; 
    border: none;
    border-radius: 50px !important;
    background-color: #D2D9C3 !important; 
    
    color: #fff !important; 
    
    font-size: 16px;
    font-weight: 400;
    outline: none;
    width: 280px;
    height: 42px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    
    position: relative; 
    z-index: 10;
    line-height: normal !important;
}

/* --- Placeholder Styles --- */
.wpfub-search-input::-webkit-input-placeholder {
    color: #1F473F !important;
    opacity: 0.7 !important;
    font-weight: 400;
}
.wpfub-search-input::-moz-placeholder {
    color: #1F473F !important;
    opacity: 0.7 !important;
    font-weight: 400;
}
.wpfub-search-input:-ms-input-placeholder {
    color: #1F473F !important;
    opacity: 0.7 !important;
    font-weight: 400;
}
.wpfub-search-input::placeholder {
    color: #1F473F !important;
    opacity: 0.7 !important;
    font-weight: 400;
}

/* Focus State */
.wpfub-search-input:focus {
    color: #fff !important;       
    background-color: #b3b3b3;    
    box-shadow: none;
}

/* --- Reset Button Styles (New) --- */
.wpfub-search-reset {
    position: absolute;
    right: 12px; /* Position inside the pill on the right */
    top: 50%;
    transform: translateY(-50%);
    color: red;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0.7;
    transition: opacity 0.2s;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
}

.wpfub-search-reset:hover {
    opacity: 1;
}

.wpfub-search-reset svg {
    display: block;
    width: 18px;
    height: 18px;
}