/**
 * Smart Order Summary plugin styles
 */

/* Modal styles - using more specific selectors to avoid overrides */
body .sos-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body .sos-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    position: relative;
    color: #333;
    line-height: 1.5;
}

body .sos-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #777;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
}

body .sos-close:hover {
    color: #333;
}

/* Form styles - using more specific selectors */
body .sos-form {
    margin-top: 20px;
}

body .sos-form p {
    margin-bottom: 15px;
    color: #333;
}

body .sos-form-row {
    margin-bottom: 15px;
    display: block;
}

body .sos-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

body .sos-form-row input[type="email"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

body .sos-form-row button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    text-transform: none;
    font-weight: normal;
    box-shadow: none;
}

body .sos-form-row button:hover {
    background-color: #005d87;
}

/* Button in order list - more specific to prevent overrides */
body .woocommerce-orders-table .sos-send-to-recipient-button {
    margin-left: 5px !important;
    display: inline-block;
}

/* Message styles with higher specificity */
body .sos-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

body .sos-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

body .sos-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Loader with higher specificity */
body .sos-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: sos-spin 1s linear infinite;
    display: none; /* Hidden by default */
    vertical-align: middle;
    margin-left: 10px;
}

/* Visible loader */
body .sos-loader.visible {
    display: inline-block;
}

@keyframes sos-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Make modal title clear and well-styled */
body .sos-modal h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body .sos-modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 90%;
    }
}

/* Astra theme compatibility - using high specificity */
body.theme-astra .sos-form-row button,
body.astra-theme .sos-form-row button {
    line-height: 1.5;
    font-weight: normal;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.theme-astra .sos-message,
body.astra-theme .sos-message {
    font-size: 14px;
    line-height: 1.5;
} 

/* Smart Order Summary Styles */

/* Enhanced button styling */
.sos-enhanced-button {
    background-color: #ee6f44 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    text-align: center !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
}

.sos-enhanced-button:hover {
    background-color: #f17e56 !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) !important;
} 