/**
 * PNMA Registration Form Styles
 * Consistent with Feedback form (tf-* CSS variables)
 * @since 1.7.0
 */

/* CSS Variables (same as feedback - define here as fallback) */
.pnma-reg-wrapper {
    --tf-primary: #2563eb;
    --tf-primary-hover: #1d4ed8;
    --tf-primary-light: #dbeafe;
    --tf-success: #10b981;
    --tf-error: #ef4444;
    --tf-gray: #6b7280;
    --tf-gray-light: #f3f4f6;
    --tf-gray-lighter: #f9fafb;
    --tf-border: #e5e7eb;
    --tf-text-dark: #111827;
    --tf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --tf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tf-radius: 8px;
    --tf-transition: all 0.2s ease;
}

/* Container - Mobile First */
.pnma-reg-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Prompt', 'Noto Sans Thai', sans-serif;
    width: 100%;
    max-width: 900px;
    margin: 10px auto;
    background: white;
    border-radius: var(--tf-radius, 8px);
    box-shadow: var(--tf-shadow, 0 1px 3px 0 rgba(0,0,0,0.1));
    overflow: hidden;
    position: relative;
}

/* Header - Same as feedback */
.pnma-reg-header {
    background: linear-gradient(135deg, var(--tf-primary, #2563eb) 0%, var(--tf-primary-hover, #1d4ed8) 100%);
    color: white;
    padding: 14px 15px;
    text-align: center;
    position: relative;
}

.pnma-reg-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.4;
    color: #ffffff !important;
}

.pnma-reg-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.9;
    color: #ffffff;
}

/* Counter - Same as feedback */
.pnma-reg-counter {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 15px;
    border-radius: 20px;
    margin-top: 10px;
    font-size: 13px;
    display: inline-block;
}

/* Form */
.pnma-reg-form {
    padding: 16px 15px;
}

.pnma-reg-field {
    margin-bottom: 16px;
}

.pnma-reg-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-text-dark, #111827);
    margin-bottom: 6px;
}

.pnma-reg-field .required {
    color: var(--tf-error, #ef4444);
}

.pnma-reg-field input[type="text"],
.pnma-reg-field input[type="email"],
.pnma-reg-field input[type="tel"],
.pnma-reg-field select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1.5px solid var(--tf-border, #e5e7eb);
    border-radius: 6px;
    background: var(--tf-gray-lighter, #f9fafb);
    transition: var(--tf-transition, all 0.2s ease);
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
}

.pnma-reg-field input:focus,
.pnma-reg-field select:focus {
    outline: none;
    border-color: var(--tf-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.pnma-reg-field select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 36px;
}

.pnma-reg-field select optgroup {
    font-weight: 600;
    color: var(--tf-text-dark, #111827);
}

.pnma-reg-field select option {
    font-weight: 400;
    padding: 4px 0;
}

/* Company other input */
.pnma-reg-company-other {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1.5px solid var(--tf-border, #e5e7eb);
    border-radius: 6px;
    background: var(--tf-gray-lighter, #f9fafb);
    transition: var(--tf-transition, all 0.2s ease);
    box-sizing: border-box;
    font-family: inherit;
}

.pnma-reg-company-other:focus {
    outline: none;
    border-color: var(--tf-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

/* Duplicate warning */
.pnma-reg-dup-warning {
    margin-top: 6px;
    font-size: 12px;
    color: var(--tf-error, #ef4444);
    font-weight: 500;
}

.pnma-reg-dup-warning .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

/* Actions - Same pattern as feedback */
.pnma-reg-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.pnma-reg-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--tf-primary, #2563eb);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tf-transition, all 0.2s ease);
    box-shadow: var(--tf-shadow-sm, 0 1px 2px 0 rgba(0,0,0,0.05));
    min-height: 38px;
    width: 100%;
    font-family: inherit;
}

.pnma-reg-submit:hover {
    background: var(--tf-primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: var(--tf-shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
}

.pnma-reg-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.pnma-reg-submit .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Spinner - Same as feedback */
.pnma-reg-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pnmaRegSpin 0.6s linear infinite;
}

@keyframes pnmaRegSpin {
    to { transform: rotate(360deg); }
}

/* Success Message - Same as feedback */
.pnma-reg-success {
    padding: 40px 20px;
    text-align: center;
}

.pnma-reg-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--tf-success, #10b981) 0%, #0ea06e 100%);
    color: white;
    border-radius: 50%;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    animation: pnmaRegPulse 2s infinite;
}

@keyframes pnmaRegPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pnma-reg-success-icon .dashicons {
    font-size: 35px;
    width: 35px;
    height: 35px;
}

.pnma-reg-success h3 {
    color: var(--tf-primary, #2563eb);
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.pnma-reg-number {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--tf-primary, #2563eb);
}

.pnma-reg-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--tf-primary, #2563eb);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--tf-transition, all 0.2s ease);
    box-shadow: var(--tf-shadow-sm, 0 1px 2px 0 rgba(0,0,0,0.05));
    margin-bottom: 16px;
}

.pnma-reg-doc-link:hover {
    background: var(--tf-primary-hover, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: var(--tf-shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
}

.pnma-reg-doc-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pnma-reg-total {
    font-size: 13px;
    color: var(--tf-gray, #6b7280);
    margin-top: 12px;
}

/* Tablet Styles */
@media (min-width: 576px) {
    .pnma-reg-wrapper {
        margin: 20px auto;
    }

    .pnma-reg-header {
        padding: 25px 20px;
    }

    .pnma-reg-title {
        font-size: 15px;
    }

    .pnma-reg-form {
        padding: 25px 20px;
    }

    .pnma-reg-actions {
        flex-direction: row;
        justify-content: center;
    }

    .pnma-reg-submit {
        width: auto;
        min-width: 200px;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .pnma-reg-wrapper {
        margin: 30px auto;
    }

    .pnma-reg-header {
        padding: 25px 30px;
    }

    .pnma-reg-title {
        font-size: 16px;
    }

    .pnma-reg-form {
        padding: 30px;
    }

    .pnma-reg-field input,
    .pnma-reg-field select {
        font-size: 15px;
    }
}
