/**
 * YB Course Manager Frontend Styles
 */

/* Disable category links in cart, mini cart, and course shortcodes */
.yb-cart-categories a,
.yb-categories a {
    pointer-events: none;
    color: inherit !important;
    text-decoration: none !important;
    cursor: default;
}

/* Participant Fields */
.yb-participants-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Participant Fields (Product Page & Cart) */
.yb-product-participants h4.yb-participants-header {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.yb-participants-warning {
    font-style: italic;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.yb-participant-row {
    margin-bottom: 10px;
}



.yb-participants-wrapper .description {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

#yb-participants-list {
    margin-bottom: 15px;
}

.yb-participant-row {
    margin-bottom: 15px;
}

.yb-participant-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.yb-participant-fields .yb-field-group {
    flex: 1;
    min-width: 200px;
}

.yb-participant-fields input[type="text"],
.yb-participant-fields input[type="email"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 0 12px 0 12px;
    /* Slightly more rounded */
    font-size: 14px;
    background-color: #fff;
    color: #333;
}

.yb-participant-fields input[type="text"]:focus,
.yb-participant-fields input[type="email"]:focus {
    outline: none;
    border-color: #0073aa;
}

.yb-participant-fields input[type="text"]::placeholder,
.yb-participant-fields input[type="email"]::placeholder {
    color: rgba(0, 0, 0, .65);
}

/* Readonly fields styling (visual disabled state) */
.yb-participant-fields input[readonly] {
    background-color: #e1e1e1;
    color: #333;
    cursor: not-allowed;
    border-color: #eee;
}

.yb-remove-participant-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.yb-remove-participant-btn:hover {
    transform: scale(1.1);
}

.yb-remove-participant-btn svg {
    width: 20px;
    height: 20px;
}

.yb-add-participant-btn,
.yb-add-me-participant-btn {
    display: inline-block;
    color: #0073aa;
    /* Standard WordPress Blue or Custom Link Color */
    text-decoration: underline;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.yb-add-participant-btn:hover,
.yb-add-me-participant-btn:hover {
    color: #005177;
    text-decoration: none;
}

.yb-add-me-participant-btn {
    margin-bottom: 15px;
    /* Spacing below "Add Me" if visible */
    display: block;
}



/* Checkout Participants */
.yb-checkout-participants-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.yb-checkout-participants-wrapper h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.yb-checkout-participants-wrapper .description {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

#yb-checkout-participants-list {
    margin-bottom: 15px;
}

.yb-checkout-participant-row {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#yb-checkout-add-participant {
    background: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#yb-checkout-add-participant:hover {
    background: #005a87;
}

.yb-checkout-remove-participant {
    padding: 8px 15px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.yb-checkout-remove-participant:hover {
    background: #c62828;
}

/* Buyer Participant Checkbox */
.yb-buyer-participant-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
}

.yb-buyer-participant-wrapper label {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.yb-buyer-participant-wrapper input[type="checkbox"] {
    margin-right: 10px;
}

.yb-buyer-participant-wrapper .woocommerce-info {
    margin: 0;
    padding: 10px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* Cart Participant Display */
.yb-participant-list {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.yb-participant-list li {
    margin: 5px 0;
    font-size: 14px;
}

/* Course Downloadables */
.yb-course-downloadables {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.yb-course-downloadables h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.downloadables-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.downloadables-list li {
    margin-bottom: 10px;
}

.download-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.download-icon {
    margin-right: 10px;
    font-size: 20px;
}

.download-name {
    flex: 1;
    font-weight: 500;
}

.download-size {
    color: #666;
    font-size: 13px;
}

.download-link:hover .download-size {
    color: #fff;
}

/* Access Denied Message */
.yb-access-denied {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    text-align: center;
}

.yb-access-denied p {
    margin: 0 0 15px;
    font-size: 16px;
    color: #856404;
}

.yb-access-denied .button {
    background: #ffc107;
    color: #333;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
}

.yb-access-denied .button:hover {
    background: #e0a800;
}

/* Courses List Shortcode */
.yb-courses-list {
    margin: 20px 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.course-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-thumbnail {
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.05);
}

.course-content {
    padding: 20px;
}

.course-title {
    margin: 0 0 15px;
    font-size: 20px;
}

.course-title a {
    color: #333;
    text-decoration: none;
}

.course-title a:hover {
    color: #0073aa;
}

.course-meta {
    margin-bottom: 15px;
}

.course-meta p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.date-icon {
    margin-right: 5px;
}

.course-recording-access {
    margin-top: 10px;
}

.access-yes {
    color: #28a745;
    font-weight: 500;
}

.access-no {
    color: #dc3545;
    font-weight: 500;
}

.course-excerpt {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.course-actions {
    margin-top: 15px;
}

.course-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.course-button:hover {
    background: #005a87;
    color: #fff;
    border-color: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .yb-participant-fields {
        grid-template-columns: 1fr;
    }

    .yb-remove-participant {
        width: 100%;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

}

/* Restructured Cart Layout */
.yb-participant-row-container td {
    padding-top: 5px;
    padding-bottom: 25px;
    border-top: none !important;
    /* Visual merge with row above */
}

/* Ensure container inside has no extra margins acting weirdly */
.yb-participant-row-container .yb-product-participants {
    margin-top: 0;
}

/* Refine the header in this context */
.yb-participant-row-container .yb-participants-header {
    margin-top: 10px;
}

/* Disable Manual Quantity Adjustment */
.woocommerce-cart .quantity .action,
.woocommerce-cart .quantity .plus,
.woocommerce-cart .quantity .minus,
.woocommerce-cart-form .quantity .action,
.woocommerce-cart-form .quantity .plus,
.woocommerce-cart-form .quantity .minus,
.brxe-woocommerce-cart-items .quantity .action,
.brxe-woocommerce-cart-items .quantity .plus,
.brxe-woocommerce-cart-items .quantity .minus,
.quantity .action {
    display: none !important;
}

.woocommerce-cart .product-quantity {
    text-align: center;
}

.woocommerce-cart .quantity input.qty,
.woocommerce-cart-form .quantity input.qty,
.brxe-woocommerce-cart-items .quantity input.qty,
.quantity input.qty {
    pointer-events: none;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    /* Remove any shadows */
    font-weight: bold;
    width: auto !important;
    min-width: 30px;
    padding: 0 !important;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
    border-radius: 0 !important;
    /* Reset border radius */
}

.woocommerce-cart .quantity,
.woocommerce-cart-form .quantity,
.brxe-woocommerce-cart-items .quantity {
    border: none !important;
    /* Ensure wrapper has no border if theme adds one */
    display: flex;
    justify-content: center;
}

.woocommerce-cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .quantity input.qty::-webkit-inner-spin-button,
.woocommerce-cart-form .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart-form .quantity input.qty::-webkit-inner-spin-button,
.brxe-woocommerce-cart-items .quantity input.qty::-webkit-outer-spin-button,
.brxe-woocommerce-cart-items .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Restructured Course Shortcode List (Cart-like) */
.yb-courses-list .yb-courses-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.yb-course-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.yb-course-row:last-child {
    border-bottom: none;
}

.yb-course-details {
    flex: 1;
    padding-right: 20px;
}

.yb-course-meta-top {
    font-size: 14px;
    font-style: italic;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.yb-course-meta-top .yb-categories {
    font-weight: 700;
    color: #000;
}

.yb-course-meta-top .yb-categories a {
    color: inherit;
    text-decoration: none;
}

.yb-course-meta-top .yb-date-range {
    color: #666;
    font-weight: 400;
}

.yb-course-title {
    margin: 5px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.yb-course-title a {
    color: #ff6600;
    /* Example Brand Orange - adjust if needed */
    text-decoration: none;
    transition: color 0.2s ease;
}

.yb-course-title a:hover {
    color: #cc5200;
}

.yb-course-meta-bottom {
    margin-top: 5px;
    font-size: 14px;
    font-style: italic;
    font-weight: 700;
    color: #000;
}

.yb-course-actions {
    flex-shrink: 0;
}

.yb-course-actions .course-button {
    background: #e0e0e0;
    /* Light grey background like in screenshot */
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.yb-course-actions .course-button:hover {
    background: #d0d0d0;
}

/* Responsive */
@media (max-width: 600px) {
    .yb-course-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .yb-course-actions {
        margin-top: 15px;
        align-self: flex-start;
    }
}