/**
 * Wesam Contact Form Styles
 *
 * @package Wesam_AlNobla
 */

.wesam-contact-form-wrapper {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    direction: rtl;
}

.wesam-contact-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.wesam-contact-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.wesam-contact-form .col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .wesam-contact-form .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.wesam-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.wesam-contact-form .form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background-color: #f8f9fa;
    background-clip: padding-box;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.wesam-contact-form .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #134b8a;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(19, 75, 138, 0.15);
}

.wesam-contact-form .form-control::placeholder {
    color: #999;
}

.wesam-contact-form select.form-control {
    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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

.wesam-contact-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.wesam-contact-form .form-check {
    position: relative;
    display: block;
    padding-right: 1.5rem;
    margin-bottom: 20px;
}

.wesam-contact-form .form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-right: -1.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wesam-contact-form .form-check-label {
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.wesam-contact-form .btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.wesam-contact-form .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #134b8a 0%, #1e5a9e 100%);
    box-shadow: 0 4px 15px rgba(19, 75, 138, 0.3);
}

.wesam-contact-form .btn-primary:hover {
    background: linear-gradient(135deg, #0e3861 0%, #134b8a 100%);
    box-shadow: 0 6px 20px rgba(19, 75, 138, 0.4);
    transform: translateY(-2px);
}

.wesam-contact-form .btn-primary:active {
    transform: translateY(0);
}

.wesam-contact-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wesam-contact-form .form-submit {
    text-align: center;
    margin-top: 30px;
}

.wesam-contact-form .btn-loading {
    display: none;
}

.wesam-contact-form .btn.loading .btn-text {
    display: none;
}

.wesam-contact-form .btn.loading .btn-loading {
    display: inline-block;
}

.wesam-contact-form .btn-loading i {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Form validation styles */
.wesam-contact-form .form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.wesam-contact-form .form-control.success {
    border-color: #28a745;
}

.wesam-contact-form .error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.wesam-contact-form .form-control.error + .error-message {
    display: block;
}

/* Response messages */
.wesam-contact-form .form-response {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    display: none;
    position: relative;
    z-index: 100;
    clear: both;
}

.wesam-contact-form .form-response.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wesam-contact-form .form-response.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wesam-contact-form .form-response.success::before {
    content: "✓ ";
    font-weight: bold;
}

.wesam-contact-form .form-response.error::before {
    content: "✗ ";
    font-weight: bold;
}

/* Loading overlay */
.wesam-contact-form.submitting {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.wesam-contact-form.submitting::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .wesam-contact-form-wrapper {
        padding: 20px 15px;
    }

    .wesam-contact-form .form-row {
        margin-right: 0;
        margin-left: 0;
    }

    .wesam-contact-form .col-md-6 {
        padding-right: 0;
        padding-left: 0;
    }

    .wesam-contact-form .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }

    .wesam-contact-form .btn {
        width: 100%;
        padding: 12px 30px;
        font-size: 15px;
    }

    .wesam-contact-form label {
        font-size: 14px;
    }
}

/* Animation for success message */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wesam-contact-form .form-response {
    animation: slideDown 0.3s ease;
}

/* Focus states for accessibility */
.wesam-contact-form .form-control:focus,
.wesam-contact-form .form-check-input:focus {
    outline: 2px solid #134b8a;
    outline-offset: 2px;
}

/* Required field indicator */
.wesam-contact-form label:after {
    content: "";
}

.wesam-contact-form .form-group.required label:after {
    content: " *";
    color: #dc3545;
}
