/**
 * Ekan Theme - Form Styles
 */

/* Form Container */
.ekan-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.ekan-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ekan-form .form-row .form-group {
    flex: 1;
}

.ekan-form .form-group {
    margin-bottom: 20px;
}

/* Form Elements */
.ekan-form input[type="text"],
.ekan-form input[type="email"],
.ekan-form input[type="tel"],
.ekan-form input[type="date"],
.ekan-form select,
.ekan-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
    text-align: right;
}

.ekan-form input[type="text"]:focus,
.ekan-form input[type="email"]:focus,
.ekan-form input[type="tel"]:focus,
.ekan-form input[type="date"]:focus,
.ekan-form select:focus,
.ekan-form textarea:focus {
    outline: none;
    border-color: #a9320f;
    box-shadow: 0 0 0 3px rgba(169, 50, 15, 0.1);
}

.ekan-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Upload */
.ekan-form input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.ekan-form input[type="file"]:hover {
    border-color: #a9320f;
    background: #fff;
}

/* Submit Button */
.ekan-form .form-submit {
    text-align: center;
    margin-top: 30px;
}

.ekan-form input[type="submit"] {
    background: #a9320f;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 200px;
}

.ekan-form input[type="submit"]:hover {
    background: #8a2a0c;
    transform: translateY(-2px);
}

.ekan-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Acceptance Checkbox */
.ekan-form .wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.ekan-form .wpcf7-acceptance input[type="checkbox"] {
    width: auto;
    margin: 4px 0 0 0;
    accent-color: #a9320f;
}

.ekan-form .wpcf7-acceptance label {
    margin: 0;
    cursor: pointer;
}

.ekan-form .wpcf7-acceptance a {
    color: #a9320f;
    text-decoration: underline;
}

.ekan-form .wpcf7-acceptance a:hover {
    text-decoration: none;
}

/* Error Messages */
.ekan-form .wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.ekan-form .wpcf7-not-valid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Success/Error Response */
.ekan-form .wpcf7-response-output {
    border: none;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-weight: 500;
    text-align: center;
}

.ekan-form .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ekan-form .wpcf7-mail-sent-ng,
.ekan-form .wpcf7-validation-errors,
.ekan-form .wpcf7-spam-blocked {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.ekan-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

.ekan-form.submitting input[type="submit"] {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ekan-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ekan-form input[type="submit"] {
        width: 100%;
        min-width: auto;
    }
}

/* Modal Styles */
.ekan-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ekan-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ekan-modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.ekan-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.ekan-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ekan-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.ekan-modal-body {
    padding: 30px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ekan-modal.show .ekan-modal-content {
    animation: fadeIn 0.3s ease-out;
}