/*
* Niroga Stethoscope Order Plugin Styles
* --------------------------------------
* Styles to integrate with the Divi theme.
*/

/*
* 1. Modal Styles (Currently unused on landing page but kept for potential future use)
*/
.niroga-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.6);
}

.niroga-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    position: relative;
}

.niroga-close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.niroga-close-button:hover,
.niroga-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.niroga-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 80%; /* Adjust this for aspect ratio */
}

.niroga-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/*
* 2. General Page & Form Styles
*/

.niroga-product-page {
    padding: 54px 0;
    max-width: 1080px;
    margin: auto;
}

.niroga-product-page .product-description {
    text-align: center;
}
.niroga-product-page .product-description img {
    margin: 20px auto;
}
.niroga-product-page p,
.niroga-product-page li {
    font-family: "Open Sans", sans-serif; /* Standard Divi body font */
    line-height: 1.7em;
    list-style-type: none;
}

#niroga-receipt-form-wrapper {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    padding: 30px;
    border-radius: 3px;
}

#niroga-receipt-form input[type="text"],
#niroga-receipt-form input[type="email"],
#niroga-receipt-form input[type="tel"],
#niroga-receipt-form input[type="file"] {
    width: 100%;
    padding: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    background-color: #eee;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease-in-out;
}

#niroga-receipt-form input[type="text"]:focus,
#niroga-receipt-form input[type="email"]:focus,
#niroga-receipt-form input[type="tel"]:focus {
    background-color: #fff;
    border-color: #2ea3f2; /* Divi's accent color */
    box-shadow: 0 0 5px rgba(46, 163, 242, 0.5);
    outline: none;
}

#niroga-form-messages .success {
    color: green;
    border: 1px solid green;
    padding: 10px;
    margin-top: 15px;
}

#niroga-form-messages .error {
    color: red;
    border: 1px solid red;
    padding: 10px;
    margin-top: 15px;
}
#niroga-receipt-form-wrapper .error {
    color: #d9534f;
}

/*
* 3. Button Styles
*/
#niroga-order-button,
#niroga-submit-receipt {
    background-color: #2ea3f2; /* Divi's default accent color */
    border-width: 2px !important;
    border-color: #2ea3f2;
    border-radius: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    padding: 10px 20px;
    margin-top: 15px;
    color: #fff;
}

#niroga-order-button:hover,
#niroga-submit-receipt:hover {
    background-color: #218ed6;
    border-color: #218ed6;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 4. Custom font for the product heading (as previously set) */
.niroga-product-page h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
}

/*
* 4.5 Special Note Highlight
*/
.niroga-special-note {
    background-color: #fffbe6; /* Light yellow background */
    border-left: 4px solid #ffc107; /* Amber border */
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.niroga-special-note p {
    margin: 0 !important;
    color: #856404; /* Darker text for readability */
    font-size: 1.1em;
}

.niroga-special-note strong {
    color: #664d03; /* Even darker for the "Special Note:" part */
}

/*
* 5. Loading Spinner for Submit Button
*/
#niroga-submit-receipt.niroga-loading,
#niroga-submit-button.niroga-loading {
    color: transparent !important; /* Hide button text */
    position: relative;
}

#niroga-submit-receipt.niroga-loading::after,
#niroga-submit-button.niroga-loading::after {
    content: '';
    display: block;
    width: 20px; /* Spinner size */
    height: 20px; /* Spinner size */
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -10px; /* Half of width */
    margin-top: -10px; /* Half of height */
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: niroga-spinner 0.6s linear infinite;
}

@keyframes niroga-spinner {
    to {
        transform: rotate(360deg);
    }
}
/* General Form Container Styling */
#niroga-order-form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form Row Styling */
#niroga-order-form .form-row {
    margin-bottom: 20px;
}

/* Label Styling */
#niroga-order-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

#niroga-order-form .required {
    color: #d9534f;
    margin-left: 4px;
}

/* Input, Textarea, and Select Fields */
#niroga-order-form input[type="text"],
#niroga-order-form input[type="email"],
#niroga-order-form input[type="tel"],
#niroga-order-form input[type="number"],
#niroga-order-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#niroga-order-form input[type="text"]:focus,
#niroga-order-form input[type="email"]:focus,
#niroga-order-form input[type="tel"]:focus,
#niroga-order-form input[type="number"]:focus,
#niroga-order-form textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
    outline: none;
}

/* File Input Styling */
#niroga-order-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
}

#niroga-order-form input[type="file"]:hover {
    border-color: #2271b1;
}

/* Informational Paragraph */
#niroga-order-form p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Submit Button Styling */
#niroga-submit-button {
    width: 100%;
    padding: 15px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#niroga-submit-button:hover {
    background-color: #1e639b;
}

#niroga-submit-button:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}

/* Form Feedback Styling (for success/error messages) */
#niroga-form-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none; /* Hidden by default */
}

#niroga-form-feedback.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    display: block;
}

#niroga-form-feedback.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
    display: block;
}

/* Styling for the wrapper that appears after clicking "Order Now" */
#niroga-receipt-form-wrapper h2 {
    text-align: center;
    margin-bottom: 20px;
}
