/**
 * File: /assets/css/form-style.css
 * Complete Form Styles with Colorful Radio Buttons
 */

/* ========================================
   BASE STYLES
   ======================================== */

.legalease-form-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.legalease-form {
    max-width: 100%;
}

.legalease-form .field {
    margin-bottom: 24px;
    position: relative;
}

.legalease-form label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.legalease-form label small {
    font-weight: 400;
    color: #666;
}

/* ========================================
   TEXT INPUTS
   ======================================== */

.legalease-form input[type="email"],
.legalease-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}

.legalease-form input[type="email"]:focus,
.legalease-form input[type="text"]:focus {
    outline: none;
    border-color: #ff9e18;
}

/* ========================================
   ERROR STATES
   ======================================== */

.legalease-form input[type="email"].error,
.legalease-form input[type="text"].error,
.legalease-form textarea.error {
    border-color: #dc3545 !important;
    border-width: 2px !important;
    background-color: #fff5f5 !important;
}

.les-rating.error {
    padding: 8px;
    background-color: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 6px;
}

.les-radio-group.error,
.les-recommend-group.error {
    padding: 8px;
    background-color: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 6px;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 14px;
    margin-top: 6px;
    font-weight: 500;
    animation: slideDownError 0.3s ease-out;
}

@keyframes slideDownError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TEXTAREA
   ======================================== */

.legalease-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    border: 2px solid #007BFF !important;
    background-color: white !important;
}

.legalease-form textarea:focus {
    outline: none;
    border-color: #ff9e18 !important;
}

/* ========================================
   SATISFACTION RATING SCALE (1-10)
   ======================================== */

.les-rating {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    margin-top: 12px;
    transition: all 0.3s;
}

.les-bubble {
    width: 44px;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 0 !important;
}

/* Red colors (1-4) */
.s1, .s2, .s3, .s4 {
    background: #ef4444 !important;
    color: white !important;
}

/* Yellow colors (5-7) */
.s5, .s6, .s7 {
    background: #fbbf24 !important;
    color: white !important;
}

/* Green colors (8-10) */
.s8, .s9, .s10 {
    background: #10b981 !important;
    color: white !important;
}

.les-bubble:hover {
    transform: scale(1.05);
}

.les-bubble.active,
.les-bubble.selected {
    border: 3px solid black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.les-bubble input[type="radio"] {
    display: none;
}

/* Rating scale labels */
.les-rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.dissatisfied {
    color: #ef4444;
}

.satisfied {
    color: #10b981;
}

/* ========================================
   COLORFUL RECOMMEND RADIO BUTTONS
   ======================================== */

.les-recommend-group {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
    transition: all 0.3s;
}

.les-recommend-bubble {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 0 !important;
    border: 3px solid transparent;
}

.les-recommend-bubble input[type="radio"] {
    display: none;
}

.les-recommend-bubble .bubble-text {
    color: white;
    font-weight: 600;
}

/* Yes - Green */
.recommend-yes {
    background: #10b981 !important;
    color: white !important;
}

.recommend-yes:hover {
    background: #059669 !important;
    transform: scale(1.05);
}

/* Maybe - Yellow/Amber */
.recommend-maybe {
    background: #fbbf24 !important;
    color: white !important;
}

.recommend-maybe:hover {
    background: #f59e0b !important;
    transform: scale(1.05);
}

/* No - Red */
.recommend-no {
    background: #ef4444 !important;
    color: white !important;
}

.recommend-no:hover {
    background: #dc2626 !important;
    transform: scale(1.05);
}

/* Selected/Active state */
.les-recommend-bubble.active,
.les-recommend-bubble.selected {
    border: 3px solid black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   LEGACY RADIO BUTTONS (if still needed)
   ======================================== */

.les-radio-group {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    flex-wrap: wrap;
    transition: all 0.3s;
}

.les-radio-group label {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 0;
    position: relative;
}

.les-radio-group label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 50%;
    outline: none;
    position: relative;
    background-color: white;
}

.les-radio-group label input[type="radio"]:hover {
    border-color: orange;
}

.les-radio-group label input[type="radio"]:checked {
    border-color: orange;
    background-color: white;
}

.les-radio-group label input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: orange;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */

.legalease-submit {
    width: 120px !important;
    padding: 10px !important;
    background: #ff9318 !important;
    background-color: #ff9318 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3) !important;
    margin-top: 8px !important;
}

.legalease-submit:hover {
    background: #ffa500 !important;
    background-color: #ffa500 !important;
    box-shadow: 0 6px 16px rgba(255, 165, 0, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.legalease-submit:active {
    background: #e67e22 !important;
    background-color: #e67e22 !important;
    transform: translateY(0) !important;
    color: white !important;
}

.legalease-submit:focus {
    outline: none !important;
    background: #ff8c00 !important;
    background-color: #ff8c00 !important;
    color: white !important;
}

.legalease-submit:disabled {
    background: #ffd4a3 !important;
    background-color: #ffd4a3 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    color: white !important;
}

/* Loading spinner */
.les-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: les-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes les-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   SUCCESS MODAL POPUP
   ======================================== */

.cf7-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cf7-modal-content {
    background: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    border: 1px solid #10b981;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cf7-success-icon {
    margin-bottom: 24px;
    animation: scaleInBounce 0.5s ease-out 0.2s both;
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.cf7-success-icon img {
    width: 52px;
    height: 52px;
}

.cf7-modal-content h2 {
    margin: 0 0 16px 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.cf7-modal-content p {
    margin: 0 0 32px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.cf7-modal-btn {
    padding: 12px 32px;
    background: #ff9e18;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.cf7-modal-btn:hover {
    background: #e67d00;
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.4);
    transform: translateY(-2px);
}

.cf7-modal-btn:active {
    transform: translateY(0);
}

/* ========================================
   ALREADY SUBMITTED POPUP
   ======================================== */

.les-already-submitted-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.les-already-submitted-popup h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.les-already-submitted-popup p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.les-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.les-popup-btn {
    padding: 12px 32px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.les-popup-btn-primary {
    background: #ff9e18;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.les-popup-btn-primary:hover {
    background: #e67d00;
    box-shadow: 0 6px 16px rgba(255, 140, 0, 0.4);
    transform: translateY(-2px);
}

.les-popup-btn-primary:active {
    transform: translateY(0);
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    /* Satisfaction Rating */
    .les-rating {
        gap: 4px;
    }
    
    .les-bubble {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    /* Recommend Buttons */
    .les-recommend-group {
        gap: 8px;
    }
    
    .les-recommend-bubble {
        padding: 10px 20px;
        font-size: 14px;
        flex: 1;
        min-width: 70px;
    }
    
    /* Legacy Radio Group */
    .les-radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Modal */
    .cf7-modal-content {
        padding: 30px 25px;
        width: 85%;
    }
    
    .cf7-modal-content h2 {
        font-size: 26px;
    }
    
    .cf7-modal-content p {
        font-size: 15px;
        margin-bottom: 24px;
    }
    
    .cf7-success-icon img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .les-bubble {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 4px;
    }
    
    .les-recommend-bubble {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .les-rating-labels {
        font-size: 10px;
    }
}