/* Frontend Styles for Quotation Request Plugin */
/* Design matched to shop.dalil.tech */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.qr-form-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.qr-form-wrapper {
    display: flex;
    gap: 0;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Section - Left Side */
.qr-form-section {
    flex: 1;
    padding: 40px;
    min-width: 300px;
    background: #000;
}

.qr-form-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, #0894FF, #C959DD, #FF2E54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image Section - Right Side */
.qr-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

.qr-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(106, 70, 185, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.qr-product-preview {
    text-align: center;
    position: relative;
    z-index: 1;
}

.qr-product-preview .qr-product-image {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.qr-product-preview .qr-product-image:hover {
    transform: scale(1.02);
}

.qr-product-title {
    margin: 30px 0 0 0;
    font-size: 32px;
    font-weight: 600;
    color: #fff;
}

.qr-product-description {
    margin: 15px 0 0 0;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    padding: 0 20px;
}

.qr-no-image {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.qr-no-image .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.2);
}

.qr-no-image p {
    margin: 15px 0 0 0;
    font-size: 14px;
    font-weight: 500;
}

/* Form Styling */
.qr-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qr-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qr-form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #c9c9c9;
    letter-spacing: 0.3px;
}

.qr-required {
    color: #FF2E54;
    margin-left: 3px;
}

/* Input Styles */
.qr-form input[type="text"],
.qr-form input[type="email"],
.qr-form input[type="tel"],
.qr-form input[type="number"],
.qr-form input[type="date"],
.qr-form select,
.qr-form textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.qr-form input[type="text"]::placeholder,
.qr-form input[type="email"]::placeholder,
.qr-form input[type="tel"]::placeholder,
.qr-form input[type="number"]::placeholder,
.qr-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.qr-form input[type="text"]:focus,
.qr-form input[type="email"]:focus,
.qr-form input[type="tel"]:focus,
.qr-form input[type="number"]:focus,
.qr-form input[type="date"]:focus,
.qr-form select:focus,
.qr-form textarea:focus {
    outline: none;
    border-color: #6A46B9;
    background: rgba(106, 70, 185, 0.1);
    box-shadow: 0 0 0 3px rgba(106, 70, 185, 0.2);
}

.qr-form textarea {
    resize: vertical;
    min-height: 100px;
}

.qr-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.qr-form select option {
    background: #1a1a1a;
    color: #fff;
}

.qr-form input[type="date"] {
    color-scheme: dark;
}

/* Radio and Checkbox Groups */
.qr-radio-group,
.qr-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-radio-label,
.qr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #c9c9c9;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.qr-radio-label:hover,
.qr-checkbox-label:hover {
    background: rgba(106, 70, 185, 0.1);
    border-color: rgba(106, 70, 185, 0.3);
}

.qr-radio-label input,
.qr-checkbox-label input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #6A46B9;
}

/* Submit Button */
.qr-form-submit {
    margin-top: 10px;
}

.qr-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #6A46B9 0%, #2F36C3 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qr-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.qr-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(106, 70, 185, 0.4);
}

.qr-submit-btn:hover::before {
    left: 100%;
}

.qr-submit-btn:active {
    transform: translateY(0);
}

.qr-submit-btn:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Message Box */
.qr-form-message {
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.qr-form-message.qr-success {
    background: rgba(58, 135, 53, 0.2);
    color: #4ade80;
    border: 1px solid rgba(58, 135, 53, 0.3);
}

.qr-form-message.qr-error {
    background: rgba(218, 63, 63, 0.2);
    color: #FF2E54;
    border: 1px solid rgba(218, 63, 63, 0.3);
}

/* Loading State */
.qr-form.qr-loading .qr-submit-btn {
    position: relative;
    color: transparent;
}

.qr-form.qr-loading .qr-submit-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qr-spin 0.8s linear infinite;
}

@keyframes qr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Invalid Input */
.qr-form input:invalid:not(:placeholder-shown),
.qr-form textarea:invalid:not(:placeholder-shown) {
    border-color: #FF2E54;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .qr-form-wrapper {
        flex-direction: column-reverse;
        border-radius: 20px;
    }

    .qr-form-section,
    .qr-image-section {
        min-width: 100%;
    }

    .qr-image-section {
        padding: 30px;
    }

    .qr-product-preview .qr-product-image {
        max-height: 220px;
    }

    .qr-form-section {
        padding: 30px 25px;
    }

    .qr-form-title {
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .qr-form-container {
        padding: 10px;
    }

    .qr-form-wrapper {
        border-radius: 16px;
    }

    .qr-form-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .qr-form {
        gap: 16px;
    }

    .qr-form input[type="text"],
    .qr-form input[type="email"],
    .qr-form input[type="tel"],
    .qr-form input[type="number"],
    .qr-form input[type="date"],
    .qr-form select,
    .qr-form textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .qr-submit-btn {
        padding: 14px 24px;
        font-size: 14px;
    }

    .qr-radio-label,
    .qr-checkbox-label {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Animation on load */
@keyframes qr-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-form-container {
    animation: qr-fadeIn 0.5s ease-out;
}
