/* Akkar Media Forms — Frontend Styles */

.amf-form-wrap {
    max-width: 100%;
}

.amf-form-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #0a0a0a;
}

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

/* Fields */
.amf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.amf-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.amf-required {
    color: #e63946;
    margin-left: 2px;
}

.amf-input,
.amf-textarea,
.amf-select,
.amf-file {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.amf-input:focus,
.amf-textarea:focus,
.amf-select:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.amf-textarea {
    resize: vertical;
    min-height: 100px;
}

.amf-select {
    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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Choices (radio/checkbox) */
.amf-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amf-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.amf-choice input {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* File */
.amf-file {
    padding: 8px;
}

/* Submit */
.amf-field-submit {
    margin-top: 10px;
}

.amf-submit {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0a0a0a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.amf-submit:hover {
    background: #fff;
    color: #0a0a0a;
    box-shadow: inset 0 0 0 2px #0a0a0a;
}

.amf-submit:active {
    transform: scale(0.98);
}

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

/* Errors */
.amf-error {
    font-size: 13px;
    color: #e63946;
    min-height: 0;
}

.amf-field.has-error .amf-input,
.amf-field.has-error .amf-textarea,
.amf-field.has-error .amf-select {
    border-color: #e63946;
}

/* Messages */
.amf-message {
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
}

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

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

/* Loading state */
.amf-form.amf-loading .amf-submit {
    position: relative;
    color: transparent;
}

.amf-form.amf-loading .amf-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: amf-spin 0.6s linear infinite;
}

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

/* Honeypot */
.amf-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 600px) {
    .amf-input,
    .amf-textarea,
    .amf-select {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 12px;
    }

    .amf-submit {
        width: 100%;
    }
}
