/* ==========================================================================
   Wayi Ticket Mailing - Frontend Styles v2.0
   URBAN TECHNOLOGY
   ========================================================================== */

.wayi-tm-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wayi-tm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wayi-tm-field-group {
    display: flex;
    flex-direction: column;
}

.wayi-tm-field-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wayi-tm-required {
    color: #d63638;
    margin-left: 3px;
}

.wayi-tm-field-group input[type="text"],
.wayi-tm-field-group input[type="email"],
.wayi-tm-field-group input[type="tel"],
.wayi-tm-field-group input[type="number"],
.wayi-tm-field-group textarea,
.wayi-tm-field-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.wayi-tm-field-group input:focus,
.wayi-tm-field-group textarea:focus,
.wayi-tm-field-group select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.wayi-tm-field-group textarea {
    resize: vertical;
    min-height: 120px;
}

.wayi-tm-field-group select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    appearance: none;
}

/* Captcha anti-robot */
.wayi-tm-captcha {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #2271b1;
}

.wayi-tm-captcha label {
    color: #2271b1;
    font-weight: 700;
}

.wayi-tm-captcha input {
    max-width: 150px;
}

/* Messages */
.wayi-tm-form-messages {
    margin: 0;
}

.wayi-tm-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.wayi-tm-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.wayi-tm-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #d63638;
}

/* Submit Button */
.wayi-tm-form-submit {
    margin-top: 10px;
}

.wayi-tm-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.wayi-tm-submit-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wayi-tm-submit-btn:active {
    transform: translateY(0);
}

.wayi-tm-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.wayi-tm-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Spinner */
.wayi-tm-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wayi-spin 0.8s linear infinite;
}

@keyframes wayi-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation States */
.wayi-tm-field-group input:invalid:not(:placeholder-shown),
.wayi-tm-field-group textarea:invalid:not(:placeholder-shown),
.wayi-tm-field-group select:invalid {
    border-color: #d63638;
}

.wayi-tm-field-group input:valid:not(:placeholder-shown),
.wayi-tm-field-group textarea:valid:not(:placeholder-shown),
.wayi-tm-field-group select:valid {
    border-color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
    .wayi-tm-form-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .wayi-tm-field-group input,
    .wayi-tm-field-group textarea,
    .wayi-tm-field-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .wayi-tm-form-container {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .wayi-tm-field-group label {
        color: #e0e0e0;
    }
    
    .wayi-tm-field-group input,
    .wayi-tm-field-group textarea,
    .wayi-tm-field-group select {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .wayi-tm-captcha {
        background: #2a3f5f;
        border-color: #4a90e2;
    }
}
