/**
 * Empyreal Custom Orders Styles
 */

/* Create Order Button */
.eco-create-order-wrapper {
    margin-top: 20px;
    text-align: center;
}

#eco-create-order-btn {
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#eco-create-order-btn:hover {
    background-color: #005177;
}

/* Modal Styles */
.eco-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.eco-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.eco-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.eco-close:hover,
.eco-close:focus {
    color: #000;
    text-decoration: none;
}

/* Form Styles */
.eco-form-group {
    margin-bottom: 15px;
}

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

.eco-form-group input[type="text"],
.eco-form-group input[type="email"],
.eco-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.eco-form-group input[type="text"]:focus,
.eco-form-group input[type="email"]:focus {
    outline: none;
    border-color: #0073aa;
}

/* Form Row Layout */
.eco-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.eco-form-group.eco-half {
    flex: 1;
    margin-bottom: 0;
}

/* Address Section Headers */
#eco-new-customer-form h4 {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* Checkbox styling */
.eco-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.eco-form-group label input[type="checkbox"] {
    margin-right: 5px;
}

/* Location Selection Section */
#eco-location-selection {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 3px;
    margin-top: 15px;
}

#eco-location-selection h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

#eco-location-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: white;
}


/* Select2 Override */
.eco-modal .select2-container {
    width: 100% !important;
}

.eco-modal .select2-container--default .select2-selection--single {
    height: 38px;
    line-height: 38px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.eco-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
}

.eco-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Fix Select2 dropdown in modal */
.select2-dropdown {
    z-index: 10000 !important;
}

.eco-modal-content {
    overflow: visible !important;
}

/* Ensure Select2 dropdown is attached to body */
.select2-container--open .select2-dropdown {
    left: auto !important;
    top: auto !important;
}

/* New Customer Toggle */
#eco-create-new-customer-toggle {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

#eco-create-new-customer-toggle:hover {
    text-decoration: underline;
}

/* New Customer Form */
#eco-new-customer-form {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 3px;
    margin-top: 15px;
}

#eco-new-customer-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

/* Form Actions */
.eco-form-actions {
    margin-top: 20px;
    text-align: center;
}

.eco-form-actions button {
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.eco-form-actions button:hover {
    background-color: #005177;
}

.eco-form-actions button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Success Message */
.eco-success-message {
    text-align: center;
}

.eco-success-text {
    color: #46b450;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Link Group */
.eco-link-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.eco-link-group input[type="text"] {
    flex: 1;
    background-color: #f5f5f5;
}

#eco-copy-link-btn {
    flex-shrink: 0;
    background-color: #666;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#eco-copy-link-btn:hover {
    background-color: #555;
}

/* Multiple Buttons */
.eco-form-actions button + button {
    margin-left: 10px;
}

#eco-close-modal-btn {
    background-color: #666;
}

#eco-close-modal-btn:hover {
    background-color: #555;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .eco-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .eco-link-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .eco-link-group input[type="text"] {
        margin-bottom: 10px;
    }
    
    #eco-copy-link-btn {
        width: 100%;
    }
}

