/**
 * Estilos del formulario de registro
 *
 * @package FryMF_Registro_Galerias
 */

/* Container */
.frymf-registro-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.frymf-titulo {
    margin: 0 0 25px;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: #1d2327;
}

/* Form fields */
.frymf-field {
    margin-bottom: 20px;
}

.frymf-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #1d2327;
}

.frymf-field label .required {
    color: #d63638;
    margin-left: 2px;
}

.frymf-field input[type="text"],
.frymf-field input[type="email"],
.frymf-field input[type="password"],
.frymf-field input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.frymf-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.frymf-field input::placeholder {
    color: #a7aaad;
}

/* Sección de códigos múltiples */
.frymf-codigos-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.frymf-codigos-section > label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
    color: #1d2327;
}

.frymf-codigos-help {
    margin: 0 0 15px;
    font-size: 13px;
    color: #646970;
}

#frymf-codigos-container {
    margin-bottom: 10px;
}

.frymf-field-codigo {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.frymf-codigo-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.frymf-codigo-row .frymf-input-wrapper {
    flex: 1;
}

.frymf-btn-remove-codigo {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    color: #d63638;
    background: #fff;
    border: 1px solid #d63638;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.frymf-btn-remove-codigo:hover {
    background: #d63638;
    color: #fff;
}

.frymf-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #2271b1;
    background: #fff;
    border: 1px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.frymf-btn-secondary:hover {
    background: #2271b1;
    color: #fff;
}

/* Código field con status */
.frymf-field-codigo .frymf-input-wrapper {
    position: relative;
}

.frymf-field-codigo input {
    padding-right: 45px;
    text-transform: uppercase;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
}

.frymf-codigo-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
}

.frymf-codigo-status.loading::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: frymf-spin 0.8s linear infinite;
}

.frymf-codigo-status.valid::after {
    content: "✓";
    color: #00a32a;
}

.frymf-codigo-status.invalid::after {
    content: "✗";
    color: #d63638;
}

@keyframes frymf-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Feedback del código */
.frymf-codigo-feedback {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
}

.frymf-codigo-feedback.valid {
    color: #00a32a;
}

.frymf-codigo-feedback.invalid {
    color: #d63638;
}

/* Preview de galerías */
.frymf-galerias-preview {
    margin-top: 8px;
    padding: 8px 10px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 12px;
    color: #1e4620;
    display: none;
}

.frymf-galerias-preview.visible {
    display: block;
}

.frymf-galerias-preview strong {
    display: inline;
    margin-right: 4px;
}

/* Error messages */
.frymf-error {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #d63638;
    min-height: 0;
}

.frymf-field.has-error input {
    border-color: #d63638;
}

.frymf-field.has-error input:focus {
    box-shadow: 0 0 0 1px #d63638;
}

/* Checkbox field */
.frymf-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.frymf-field-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.frymf-field-checkbox span a {
    color: #2271b1;
    text-decoration: none;
}

.frymf-field-checkbox span a:hover {
    text-decoration: underline;
}

/* Messages */
.frymf-messages {
    margin-bottom: 20px;
}

.frymf-message {
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.frymf-message-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
    color: #8a1f1f;
}

.frymf-message-success {
    background: #edfaef;
    border: 1px solid #00a32a;
    color: #1e4620;
}

/* Submit button */
.frymf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.frymf-btn:hover {
    background: #135e96;
}

.frymf-btn:disabled {
    background: #a7aaad;
    cursor: not-allowed;
}

.frymf-btn-submit {
    width: 100%;
}

.frymf-spinner {
    width: 20px;
    height: 20px;
}

/* Login link */
.frymf-login-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #646970;
}

.frymf-login-link a {
    color: #2271b1;
    text-decoration: none;
}

.frymf-login-link a:hover {
    text-decoration: underline;
}

/* Ya registrado */
.frymf-ya-registrado {
    text-align: center;
    padding: 30px;
}

.frymf-ya-registrado p {
    margin-bottom: 15px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 540px) {
    .frymf-registro-container {
        padding: 20px;
        margin: 0 10px;
        border-radius: 6px;
    }

    .frymf-titulo {
        font-size: 20px;
    }

    .frymf-field input {
        padding: 10px 12px;
        font-size: 16px; /* Previene zoom en iOS */
    }

    .frymf-btn {
        padding: 12px 20px;
    }
}
