/**
 * Copyright © ItTools. All rights reserved.
 */

/* Quote Button Styling */
.quote-form-widget {
    margin: 20px 0;
}

.quote-form-widget .quote-button {
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
}

/* Modal Styling */
.quote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999 !important;
}

.quote-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999998 !important;
    cursor: pointer;
}

.quote-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999 !important;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Ensure modal container blocks all pointer events to elements below */
.quote-modal {
    pointer-events: auto;
}

.quote-modal * {
    pointer-events: auto;
}

.quote-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.quote-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.quote-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.quote-modal-close:hover {
    color: #000;
}

.quote-modal-body {
    padding: 30px;
}

/* Form Styling */
.quote-modal-body .field {
    margin-bottom: 20px;
}

.quote-modal-body .field.required > .label:after {
    content: '*';
    color: #e02b27;
    margin-left: 5px;
}

.quote-modal-body .label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.quote-modal-body .control {
    position: relative;
}

.quote-modal-body .input-text,
.quote-modal-body textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.quote-modal-body .input-text:focus,
.quote-modal-body textarea:focus {
    outline: none;
    border-color: #1979c3;
}

.quote-modal-body textarea {
    resize: vertical;
    min-height: 100px;
}

.quote-modal-body input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
}

.file-upload-info {
    margin-top: 8px;
    font-size: 13px;
}

.file-count {
    color: #666;
}

.file-error {
    color: #e02b27;
    font-weight: 600;
}

/* Form Actions */
.quote-modal-body .actions-toolbar {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.quote-modal-body .actions-toolbar .primary {
    flex: 1;
}

.quote-modal-body .actions-toolbar .secondary {
    flex: 1;
}

.quote-modal-body .action.submit {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
}

.quote-modal-body .action.cancel {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
}

.quote-modal-body .action.cancel:hover {
    background: #e0e0e0;
}

.quote-modal-body .action.submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message Container */
.quote-modal-body .message-container {
    margin-top: 20px;
}

.quote-modal-body .message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.quote-modal-body .message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.quote-modal-body .message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Validation Error Styling */
.quote-modal-body .mage-error {
    color: #e02b27;
    font-size: 12px;
    margin-top: 5px;
}

.quote-modal-body .input-text.mage-error,
.quote-modal-body textarea.mage-error {
    border-color: #e02b27;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quote-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .quote-modal-header {
        padding: 15px 20px;
    }

    .quote-modal-header h2 {
        font-size: 20px;
    }

    .quote-modal-body {
        padding: 20px;
    }

    .quote-modal-body .actions-toolbar {
        flex-direction: column;
    }
}
