/**
 * Modern & Professional Form Styling for Adma Theme
 * Enhanced form styles for better UX
 */

/* ============================================
   Contact Form Styling
   ============================================ */
.contact-form {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.contact-form h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
    position: relative;
    padding-bottom: 15px;
}

.contact-form h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ============================================
   Form Group Styling
   ============================================ */
.contact-form .form-group,
.contact-area .form-group {
    margin-bottom: 25px;
    position: relative;
}

.contact-form .form-group label,
.contact-area .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.contact-form .form-group label .text-danger,
.contact-area .form-group label .text-danger {
    color: #e74c3c;
    margin-left: 3px;
}

/* ============================================
   Form Control (Input Fields) Styling
   ============================================ */
.contact-form .form-control,
.contact-area .form-control,
.search-form .form-control {
    width: 100%;
    height: 56px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.contact-form .form-control:focus,
.contact-area .form-control:focus,
.search-form .form-control:focus {
    background-color: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.contact-form .form-control::placeholder,
.contact-area .form-control::placeholder,
.search-form .form-control::placeholder {
    color: #999;
    font-weight: 400;
    opacity: 0.8;
}

.contact-form .form-control:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

/* ============================================
   Textarea Styling
   ============================================ */
.contact-form .form-control.textarea,
.contact-area .form-control.textarea {
    min-height: 140px;
    padding-top: 15px;
    resize: vertical;
    line-height: 1.6;
}

.contact-form .form-control.textarea:focus {
    min-height: 150px;
}

/* ============================================
   Form Check (Checkbox) Styling
   ============================================ */
.contact-form .form-check,
.contact-area .form-check {
    margin-bottom: 25px;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-form .form-check-input,
.contact-area .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    margin-right: 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-form .form-check-input:hover,
.contact-area .form-check-input:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.contact-form .form-check-input:checked,
.contact-area .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-form .form-check-input:focus,
.contact-area .form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
}

.contact-form .form-check-label,
.contact-area .form-check-label {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.contact-form .form-check-label a,
.contact-area .form-check-label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-form .form-check-label a:hover,
.contact-area .form-check-label a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ============================================
   Form Button Styling
   ============================================ */
.contact-form .default-btn,
.contact-area .default-btn {
    padding: 16px 35px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-form .default-btn::before,
.contact-area .default-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-form .default-btn:hover::before,
.contact-area .default-btn:hover::before {
    width: 300px;
    height: 300px;
}

.contact-form .default-btn:hover,
.contact-area .default-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.contact-form .default-btn:active,
.contact-area .default-btn:active {
    transform: translateY(-1px);
}

.contact-form .default-btn i,
.contact-area .default-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.contact-form .default-btn:hover i,
.contact-area .default-btn:hover i {
    transform: translateX(5px);
}

/* ============================================
   Search Form Styling
   ============================================ */
.search-form {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-form .form-control {
    flex: 1;
    padding-right: 50px;
}

.search-form .default-btn {
    padding: 12px 20px;
    min-width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form .default-btn i {
    margin: 0;
    font-size: 18px;
}

/* ============================================
   Form Validation States
   ============================================ */
.contact-form .form-control.is-invalid,
.contact-area .form-control.is-invalid {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.contact-form .form-control.is-invalid:focus,
.contact-area .form-control.is-invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.contact-form .form-control.is-valid,
.contact-area .form-control.is-valid {
    border-color: #27ae60;
    background-color: #f0fff4;
}

.contact-form .form-control.is-valid:focus,
.contact-area .form-control.is-valid:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

/* ============================================
   Select Dropdown Styling
   ============================================ */
.contact-form select.form-control,
.contact-area select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    appearance: none;
    cursor: pointer;
}

.contact-form select.form-control:focus,
.contact-area select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .contact-form {
        padding: 25px 20px;
    }
    
    .contact-form h1 {
        font-size: 26px;
        margin-bottom: 25px;
    }
    
    .contact-form .form-control,
    .contact-area .form-control {
        height: 50px;
        font-size: 14px;
        padding: 12px 18px;
    }
    
    .contact-form .form-control.textarea {
        min-height: 120px;
    }
    
    .contact-form .default-btn {
        padding: 14px 30px;
        font-size: 15px;
        width: 100%;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form .default-btn {
        width: 100%;
    }
}

/* ============================================
   Form Loading State
   ============================================ */
.contact-form form.submitting .default-btn {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.contact-form form.submitting .default-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Form Success Animation
   ============================================ */
.contact-form .form-group.success .form-control {
    border-color: #27ae60;
    background-color: #f0fff4;
}

.contact-form .form-group.success::after {
    content: '\2713';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #27ae60;
    font-size: 20px;
    font-weight: bold;
    opacity: 0;
    animation: checkmark 0.5s ease forwards;
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

