.bpq-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.bpq-form-group {
    margin-bottom: 20px;
}

.bpq-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.bpq-form-group input,
.bpq-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #767676;
    border-radius: 4px;
    font-size: 14px;
}

.bpq-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox alignment */
.bpq-form label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.bpq-checkbox-field {
    margin-bottom: 15px;
}

.bpq-checkbox-field label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.bpq-checkbox-field label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.bpq-checkbox-field .bpq-field-description {
    display: block;
    margin-top: 5px;
    margin-left: 24px;
    font-size: 0.9em;
    color: #666;
}

.bpq-submit-btn {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.bpq-submit-btn:hover {
    background-color: #005a87;
}

.bpq-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.bpq-notice {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid;
}

.bpq-notice.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.bpq-notice.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.bpq-notice.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Registration and Login Section Consistency */
.bpq-auth-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.bpq-auth-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #23282d;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.bpq-form input[type="text"]:focus,
.bpq-form input[type="email"]:focus,
.bpq-form input[type="password"]:focus,
.bpq-form textarea:focus {
    border-color: #0073aa;
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

.bpq-auth-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.bpq-toggle-btn {
    padding: 10px 20px;
    border: 2px solid #0073aa;
    background-color: #fff;
    color: #0073aa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bpq-toggle-btn:hover {
    background-color: #f0f8ff;
}

.bpq-toggle-btn.active {
    background-color: #0073aa;
    color: #fff;
}

.bpq-password-reset {
    text-align: center;
    margin-top: 15px;
}

.bpq-password-reset a {
    color: #0073aa;
    text-decoration: underline;
}

.bpq-password-reset a:hover {
    text-decoration: underline;
}

/* Style WordPress login form to match registration form */
.bpq-auth-section #loginform {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.bpq-auth-section #loginform p {
    margin-bottom: 20px;
}

.bpq-auth-section #loginform label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.bpq-auth-section #loginform input[type="text"],
.bpq-auth-section #loginform input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #767676;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.bpq-auth-section #loginform input[type="text"]:focus,
.bpq-auth-section #loginform input[type="password"]:focus {
    border-color: #0073aa;
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

.bpq-auth-section #loginform .login-remember {
    margin-bottom: 20px;
}

.bpq-auth-section #loginform .login-remember label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.bpq-auth-section #loginform .login-remember input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.bpq-auth-section #loginform input[type="submit"] {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: auto;
    box-sizing: border-box;
}

.bpq-auth-section #loginform input[type="submit"]:hover {
    background-color: #005a87;
}

/* Remove nested form styling conflicts */
.bpq-auth-section .bpq-form {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    max-width: 100%;
}

/* Standalone Q&A Shortcode Styles */
.bpq-project-qa {
    margin: 20px 0;
}

.bpq-project-qa .bpq-project-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.bpq-project-qa .bpq-project-header h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
}

.bpq-project-deadlines {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bpq-deadline {
    display: flex;
    flex-direction: column;
}

.bpq-deadline-label {
    font-weight: bold;
    color: #23282d;
    margin-bottom: 4px;
}

.bpq-deadline-value {
    color: #50575e;
}

.bpq-project-qa .bpq-qa-section {
    margin-top: 20px;
}

.bpq-no-questions {
    color: #666;
    font-style: italic;
}

.bpq-qa-list {
    margin: 20px 0;
}

.bpq-qa-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.bpq-qa-question {
    cursor: pointer;
    padding: 12px 15px;
    padding-right: 40px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    position: relative;
}

.bpq-question-text-container {
    min-height: 1.4em;
    max-height: 120px;
    overflow-y: auto;
}

.bpq-answer-text-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bpq-qa-question:hover {
    background: #e9e9e9;
}

.bpq-qa-question:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

/* Chevron indicator */
.bpq-qa-question::after {
    content: '\25BC';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.bpq-qa-item.expanded .bpq-qa-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.bpq-qa-answer {
    display: none;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-bottom: 10px;
}

.bpq-qa-header-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.25em;
    font-weight: normal;
}

.bpq-qa-reference {
    font-style: italic;
}

.bpq-qa-separator {
    margin: 0 0.4em;
    color: #999;
}

.bpq-qa-date {
    /* inherits from .bpq-qa-header-meta */
}

.bpq-my-projects {
    margin: 20px 0;
}

.bpq-my-project {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.bpq-my-project h3 {
    margin: 0 0 10px 0;
}

.bpq-questions-list {
    margin-top: 10px;
}

.bpq-question-item {
    padding: 10px;
    border-left: 3px solid #ddd;
    margin-bottom: 5px;
}

.bpq-question-item.pending {
    border-left-color: #ffc107;
}

.bpq-question-item.answered {
    border-left-color: #28a745;
}

.bpq-question-item.declined {
    border-left-color: #dc3545;
}

.bpq-question-text {
    font-size: 0.9em;
}

.bpq-question-meta {
    font-size: 0.8em;
    color: #666;
}

.bpq-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 600;
}

.bpq-status-pending {
    background-color: #fff8e1;
    color: #e65100;
}

.bpq-status-answered {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.bpq-status-declined {
    background-color: #ffebee;
    color: #c62828;
}

.bpq-project-status {
    font-weight: bold;
}

.bpq-project-status.open {
    color: #1b7a30;
}

.bpq-project-status.closed {
    color: #b71c1c;
}

.bpq-project-status.past {
    color: #616161;
}

.bpq-past-toggle {
    font-size: 13px;
    margin-bottom: 15px;
}

.bpq-past-toggle a {
    color: #0073aa;
    text-decoration: underline;
}

.bpq-past-toggle a:hover {
    text-decoration: underline;
}

/* Button styling for my-projects table */
.bpq-my-projects .button {
    display: inline-block;
    padding: 10px 16px;
    font-size: 13px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    background-color: #fff;
    color: #0073aa;
    text-decoration: none;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.bpq-my-projects .button:hover {
    background-color: #f0f8ff;
}

.bpq-my-projects .button-primary {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.bpq-my-projects .button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
}

.bpq-rate-limit-info {
    font-size: 0.9em;
    color: #666;
}

.bpq-field-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.bpq-field-error {
    display: block;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .bpq-form {
        max-width: 100%;
        padding: 15px;
    }
    .bpq-qa-list,
    .bpq-my-projects {
        padding: 0 10px;
    }
    .bpq-projects-table {
        display: block;
        overflow-x: auto;
    }
}

/* Project Listing Styles */
.bpq-project-listing {
    margin: 20px 0;
}

.bpq-no-projects {
    font-style: italic;
    color: #666;
}

.bpq-year-heading {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Year navigation bar */
.bpq-year-nav {
    margin-bottom: 25px;
    padding: 10px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.8;
}

.bpq-year-nav-link {
    display: inline-block;
    padding: 2px 8px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.bpq-year-nav-link:hover,
.bpq-year-nav-link:focus {
    color: #005a87;
    text-decoration: underline;
}

.bpq-year-nav-sep {
    color: #999;
    margin: 0 2px;
}

/* Collapsible year headings */
.bpq-collapsible .bpq-year-heading[role="button"] {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    user-select: none;
}

.bpq-collapsible .bpq-year-heading[role="button"]:hover {
    color: #0073aa;
}

.bpq-collapsible .bpq-year-heading[role="button"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Chevron indicator for collapsible year headings */
.bpq-collapsible .bpq-year-heading[role="button"]::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.bpq-collapsible .bpq-expanded .bpq-year-heading[role="button"]::after {
    transform: translateY(-50%) rotate(0deg);
}

.bpq-collapsible .bpq-collapsed .bpq-year-heading[role="button"]::after {
    transform: translateY(-50%) rotate(-90deg);
}

.bpq-project-item {
    margin-bottom: 20px;
    line-height: 1.6;
}

.bpq-project-title {
    font-weight: normal;
}

.bpq-project-date {
    color: #666;
}

.bpq-project-documents {
    margin-top: 5px;
}

.bpq-project-documents a {
    margin-right: 5px;
}

.bpq-doc-unavailable {
    color: #666;
    margin-right: 5px;
}

/* Clean listing page template styles */
.bpq-listing-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.bpq-listing-page h1 {
    margin-bottom: 20px;
    font-size: 2em;
}

body.bpq-listing-page-body {
    background: #fff;
}

/* Character counter */
.bpq-char-count {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #666;
}

.bpq-char-count-warn {
    color: #dc3545;
    font-weight: 600;
}

/* Password visibility toggle */
.bpq-auth-section #loginform .bpq-show-password {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.bpq-auth-section #loginform .bpq-show-password input {
    width: auto;
    margin-right: 8px;
}