/* Value Stacking Forms - Main Form Styles */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

/* Form Container Base */
.vs-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Form Base Styles */
.vs-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Form Group */
.vs-form-group {
    position: relative;
    margin-bottom: 30px;
}

/* Input Container with Underline Style */
.vs-input-container {
    position: relative;
    width: 100%;
}

/* Input Field Base */
.vs-input {
    width: 100%;
    padding: 15px 0 15px 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
    font-family: 'Kanit', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.vs-input::placeholder {
    color: transparent;
}

.vs-input:focus {
    border-bottom-color: #FED638;
}

/* Label Styles */
.vs-label {
    position: absolute;
    left: 0;
    top: 15px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    pointer-events: none;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
    z-index: 1;
}

/* Label Animation */
.vs-input:focus + .vs-label,
.vs-input:valid + .vs-label,
.vs-input:not(:placeholder-shown) + .vs-label {
    transform: translateY(-25px) scale(0.85);
    color: #FED638;
    font-weight: 600;
}

/* Underline Animation */
.vs-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FED638, #ffffff);
    transition: width 0.4s ease;
}

.vs-input:focus ~ .vs-underline {
    width: 100%;
}

/* Button Base Styles */
.vs-form-button {
    position: relative;
    background: #E7243B;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 16px 80px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0px 0px #FED638;
    font-family: 'Kanit', sans-serif;
    text-transform: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin: 30px auto 0;
    min-width: 200px;
    overflow: hidden;
}

.vs-form-button:hover {
    background: #408aee;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 7px 7px 0px 0px #FED638;
}

.vs-form-button:active {
    transform: translateY(0px);
    box-shadow: 3px 3px 0px 0px #FED638;
}

.vs-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 3px 3px 0px 0px #FED638 !important;
}

/* Button Text */
.vs-btn-text {
    position: relative;
    z-index: 2;
    display: block;
}

/* Loading State */
.vs-form-button.loading {
    pointer-events: none;
}

.vs-form-button.loading .vs-btn-text {
    opacity: 0.7;
}

.vs-form-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: vs-spin 1s linear infinite;
}

@keyframes vs-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Error States */
.vs-input.error {
    border-bottom-color: #ff6b6b;
    animation: vs-shake 0.5s ease-in-out;
}

.vs-input.error + .vs-label {
    color: #ff6b6b;
}

.vs-input.error ~ .vs-underline {
    background: #ff6b6b;
}

@keyframes vs-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success States */
.vs-input.success {
    border-bottom-color: #4ade80;
}

.vs-input.success + .vs-label {
    color: #4ade80;
}

.vs-input.success ~ .vs-underline {
    background: linear-gradient(90deg, #4ade80, #22c55e);
    width: 100%;
}

/* Success Checkmark */
.vs-input.success + .vs-label::after {
    content: '✓';
    position: absolute;
    right: -25px;
    top: 0;
    color: #4ade80;
    font-weight: 700;
    animation: vs-checkmark 0.3s ease-in-out;
}

@keyframes vs-checkmark {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

/* Form Validation Messages */
.vs-form-message {
    position: absolute;
    bottom: -25px;
    left: 0;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

.vs-form-message.error {
    color: #ff6b6b;
}

.vs-form-message.success {
    color: #4ade80;
}

.vs-form-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Textarea Specific Styles */
.vs-textarea {
    width: 100%;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
    font-family: 'Kanit', sans-serif;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.vs-textarea:focus {
    border-bottom-color: #FED638;
}

.vs-textarea:focus + .vs-label,
.vs-textarea:valid + .vs-label,
.vs-textarea:not(:placeholder-shown) + .vs-label {
    transform: translateY(-25px) scale(0.85);
    color: #FED638;
    font-weight: 600;
}

/* Checkbox and Radio Styles */
.vs-checkbox-container,
.vs-radio-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.vs-checkbox,
.vs-radio {
    opacity: 0;
    position: absolute;
}

.vs-checkbox-custom,
.vs-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    margin-right: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.vs-checkbox-custom {
    border-radius: 4px;
}

.vs-radio-custom {
    border-radius: 50%;
}

.vs-checkbox:checked + .vs-checkbox-custom {
    background: #FED638;
    border-color: #FED638;
}

.vs-radio:checked + .vs-radio-custom {
    background: #FED638;
    border-color: #FED638;
}

.vs-checkbox:checked + .vs-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1C1C1E;
    font-weight: 700;
    font-size: 0.9rem;
}

.vs-radio:checked + .vs-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #1C1C1E;
    border-radius: 50%;
}

.vs-checkbox-label,
.vs-radio-label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Kanit', sans-serif;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vs-form-container {
        padding: 30px 15px;
    }
    
    .vs-form {
        gap: 30px;
    }
    
    .vs-input,
    .vs-textarea {
        font-size: 1.1rem;
        padding: 12px 0;
    }
    
    .vs-label {
        font-size: 1.1rem;
        top: 12px;
    }
    
    .vs-form-button {
        padding: 14px 60px;
        font-size: 1.1rem;
        margin-top: 20px;
    }
    
    .vs-form-group {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .vs-form-container {
        padding: 20px 10px;
    }
    
    .vs-input,
    .vs-textarea {
        font-size: 1rem;
    }
    
    .vs-label {
        font-size: 1rem;
    }
    
    .vs-form-button {
        padding: 12px 40px;
        font-size: 1rem;
        min-width: 180px;
    }
}