/**
 * Frontend styles for Notify Me Plus
 *
 * @package notify-me-plus
 */

.nmp-notify-me-plus {
    clear: both;
    margin: 1em 0;
    width: 100%;
    display: block;
}

/* Button container */
.nmp-button {
    margin: 0.5em 0;
    display: block;
    width: 100%;
}

/* Ensure buttons match theme's add to cart button */
.nmp-button button {
    display: inline-block;
    width: auto;
    min-width: 150px;
    margin: 0;
    line-height: normal;
    vertical-align: middle;
}

/* Message styling */
.nmp-button p {
    margin: 0 0 0.5em 0;
    padding: 0;
    font-size: 0.9em;
}

/* Out of stock specific */
.stock.out-of-stock + .nmp-stock-notification-wrap {
    margin-top: 1em;
}

/* Ensure proper stacking in flex layouts */
.single_variation_wrap {
    display: block;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nmp-button button {
        width: 100%;
    }
}

/* Modal styles */
.nmp-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 16px;
}

.nmp-modal.nmp-show {
    display: block;
}

.nmp-modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: nmpFadeIn 0.3s;
}

.nmp-modal button.button:disabled[disabled], .nmp-modal button.button:disabled[disabled]:hover {
    opacity: 0.5;
}

@keyframes nmpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nmp-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.nmp-close:hover {
    color: #555;
}

/* Notification form styles */
.nmp-notification-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.nmp-product-info {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.nmp-product-image {
    flex: 0 0 80px;
    margin-right: 15px;
}

.nmp-product-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
}

.nmp-product-details h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

.nmp-variation-attributes {
    font-size: 0.9em;
    color: #777;
}

.nmp-form-row {
    margin-bottom: 15px;
}

.nmp-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.nmp-form-row .nmp-form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: #f2f2f2;
    color: #43454b;
    -webkit-appearance: none;
    box-sizing: border-box;
    font-weight: 400;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .125);
}

.nmp-form-row .checklist {
    margin: 0;
    list-style: none;
	max-height: 150px;
    overflow-y: auto;
}
.nmp-form-row .checklist .children {
    list-style: none;
	margin-left: 16px;
}
.nmp-form-row .checklist label {
    font-weight: normal;
}
.nmp-form-row .checklist input {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    color: #50575e;
    clear: none;
    cursor: pointer;
    display: inline-block;
    line-height: 0;
    height: 1rem;
    margin: -.25rem .25rem 0 0;
    outline: 0;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
    width: 1rem;
    min-width: 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
    transition: .05s border-color ease-in-out;
}

.nmp-form-row input.nmp-error-field {
    border-color: #e2401c;
}
.nmp-form-row .nmp-desc {
    margin: 0px;
}
.nmp-dismiss {
    background-color: #eeeeee;
    border-color: #eeeeee;
    color: #333333;
}
.nmp-checkbox-row label {
    font-weight: normal;
    display: flex;
    align-items: flex-start;
}

.nmp-checkbox-row input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

.nmp-form-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.nmp-form-row .select2-container--default .select2-selection--multiple {
    background-color: #f2f2f2;
	border: 1px solid #ddd !important;
	border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .125);
}

.select2-container {
	z-index: 999999;
}

.select2-dropdown {
	border: 1px solid #ddd !important;
	border-radius: 3px !important;
    background-color: #f2f2f2 !important;
}

.nmp-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 3px;
}

.nmp-form-actions {
    margin-top: 20px;
    text-align: right;
}

.nmp-form-actions button {
    padding: 10px 20px;
}

.nmp-form-actions button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* My Account requests page */
.nmp-requests-table{
    font-size: .875em;
}
.nmp-requests-table th,
.nmp-requests-table td {
    padding: 12px 15px;
}
.nmp-requests-table .nmp-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nmp-requests-table .nmp-request-image {
    max-width: 60px;
}
.nmp-requests-table .nmp-attrs {
    margin-bottom: 5px;
}
.nmp-requests-table .nmp-attrs span {
    font-weight: 600;
}
.nmp-requests-table .nmp-note {
    margin-top: 10px;
    padding: 0px 5px;
    border: 1px solid #EF6C00;
    font-size: .875em;
    background: #FFF3E0;
}
.nmp-requests-table .nmp-note.success{
    background: #c6e1c6;
    border-color: #00a32a;
}
.nmp-requests-table .nmp-btn {
	padding: 0px 10px;    
    display: inline-block;
    box-sizing: border-box;
    white-space: nowrap;
	/*min-height: 30px;
    line-height: 2.15384615;  */  
    border-radius: 3px;
	background: #e5e5e5;    
	color: #454545;
    border-width: 3px 5px;
    border-color: transparent;
    border-style: solid;
}

.nmp-requests-table .nmp-btn.btn-waiting{
	background: #c8d7e1;
    color: #003d66;
}
.nmp-requests-table .nmp-btn.btn-queued{
	background: #f8dda7;
    color: #573b00;
}
.nmp-requests-table .nmp-btn.btn-notified{
	background: #c6e1c6;
    color: #2c4700;    
}
.nmp-requests-table .nmp-btn.btn-failed{
	background: #FFAB91;
    color: #2c4700;    
}
.nmp-requests-table .nmp-btn.btn-inactive{
    background: #e5e5e5;    
	color: #454545;
}

.nmp-requests-table .nmp-btn.nmp-success{
	border-left-color: #c6e1c6;    
}

.nmp-request-actions .button {
    margin: 0 5px 5px 0;
    padding: 5px 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: unset;
}
.nmp-request-actions .button img {
    max-width: unset !important;
}

.nmp-hidden {
	display: none !important;
}

.nmp-requests-table .nmp-request-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.nmp-requests-table .nmp-request-actions .nmp-notify-me-plus,
.nmp-requests-table .nmp-request-actions .nmp-button {
    margin: unset;
    width: unset;
}
.nmp-pagination {
    font-size: .875em;
}

.wp-theme-storefront .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--notifications a::before {
    content: "";
}

.nmp-notify-me-plus button {
    float: unset !important;
}

.wc-block-product .nmp-loop_page{
	text-align: center;
}

#nmp-notification-form .input-text {
    padding: .6180469716em;
    background-color: #f2f2f2;
    color: #43454b;
    border: 0;
    -webkit-appearance: none;
    box-sizing: border-box;
    font-weight: 400;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .125);
}

/* Responsive styles */
@media (max-width: 768px) {
    .nmp-modal-content {
        margin: 20px auto;
        max-width: 90%;
        padding: 15px;
    }

    .nmp-product-info {
        flex-direction: column;
    }

    .nmp-product-image {
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .nmp-product-image img {
        max-width: 120px;
    }

    .nmp-requests-table th,
    .nmp-requests-table td {
        padding: 8px 10px;
    }
}
