/**
 * Styles for: Modern Floating Quote Popup
 */

.cenova-quote {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cenova-quote.is-active {
    opacity: 1;
    visibility: visible;
}

.cenova-quote__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.cenova-quote__body {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #111;
    border: 1px solid rgba(232, 212, 77, 0.3);
    padding: 50px 40px;
    border-radius: 24px;
    transform: scale(0.9) translateY(30px);
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    margin: 20px;
    padding-bottom: 20px;
}

.cenova-quote.is-active .cenova-quote__body {
    transform: scale(1) translateY(0);
}

.cenova-quote__close {
    position: absolute;
    top: 15px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s;
    z-index: 10;
}

.cenova-quote__close:hover {
    background: #e8d44d;
    color: #000;
    transform: rotate(90deg);
}

.cenova-quote__header {
    text-align: center;
    margin-bottom: 45px; /* Increased from 35px */
}

.cenova-quote__header h3 {
    color: #e8d44d;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.cenova-quote__header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin: 0;
}

.cenova-quote__form {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Slightly increased gap */
    margin-top: 10px;
}

.cenova-quote__group {
    position: relative;
}

.cenova-quote__input,
.cenova-quote__textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px; /* Increased padding */
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.cenova-quote__input:focus,
.cenova-quote__textarea:focus {
    border-color: #e8d44d;
    background: rgba(232, 212, 77, 0.05);
}

.cenova-quote__textarea {
    height: 180px; /* Increased from 120px */
    resize: none;
}

.cenova-quote__error {
    display: block;
    color: #ff4d4d;
    font-size: 11px;
    margin-top: 5px; /* Thêm khoảng cách phía trên thông báo lỗi */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    padding-left: 5px;
}

.cenova-quote__group.has-error .cenova-quote__error {
    max-height: 40px; /* Cho phép đẩy khối bên dưới xuống */
    opacity: 1;
}

.cenova-quote__group.has-error .cenova-quote__input {
    border-color: #ff4d4d;
}

.cenova-quote__submit {
    margin-top: 10px;
    background: #e8d44d;
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.cenova-quote__submit svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    transition: transform 0.3s;
}

.cenova-quote__submit:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(232, 212, 77, 0.3);
}

.cenova-quote__submit:hover svg {
    transform: translateX(5px);
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .cenova-quote__body {
        padding: 30px 20px;
        max-width: 340px; /* Thu nhỏ chiều ngang cho cân đối */
        border-radius: 20px;
        padding-bottom: 0 !important;
    }
    .cenova-quote__header {
        margin-bottom: 25px;
    }
    .cenova-quote__header h3 {
        font-size: 18px; /* Giảm cỡ chữ tiêu đề */
    }
    .cenova-quote__header p {
        font-size: 13px;
    }
    .cenova-quote__form {
        gap: 12px;
    }
    .cenova-quote__input,
    .cenova-quote__textarea {
        padding: 12px 15px;
        font-size: 14px;
    }
    .cenova-quote__textarea {
        height: 100px; /* Thu ngắn ô vấn đề trên mobile */
    }
    .cenova-quote__submit {
        padding: 14px;
        font-size: 14px;
    }
    .cenova-quote__close {
        top: 10px;
        right: 10px;
        margin: 0;
        font-size: 15px;
    }
}
