/* Reset and base styles - Minimal for iframe */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: transparent;
    padding: 20px;
}

/* Form container */
.form-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Messages */
.message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.message-actions {
    margin-top: 15px;
}

/* Form layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.9rem;
}

.required {
    color: #dc3545;
}

.optional {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.85rem;
}

.form-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    color: #333;
}

input:focus {
    outline: none;
    border-color: #FF3A13;
    box-shadow: 0 0 0 3px rgba(255, 58, 19, 0.15);
}

input::placeholder {
    color: #adb5bd;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: #FF3A13;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #e5330e;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form actions */
.form-actions {
    text-align: center;
    margin-top: 20px;
}

.submit-btn {
    position: relative;
    min-width: 180px;
    width: 100%;
}

.loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Error styles */
.error-text {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    min-height: 18px;
}

.form-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Responsive design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Loading animation */
.loading-text::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    animation: loading 1.4s infinite ease-in-out both;
    margin-left: 8px;
}

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
