/**
 * Registration Form Styles for Custom Fields PF
 */

.cfpf-registration-form-wrapper {
    max-width: 80%;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cfpf-reg-title {
    text-align: center;
    margin: 0 0 40px 0;
    color: #333;
    font-size: 32px;
    font-weight: 700;
}

/* Steps Navigation Cards */
.cfpf-steps-navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.cfpf-step-card {
    flex: 1;
    min-width: 150px;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.cfpf-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cfpf-step-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cfpf-step-card.completed {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.cfpf-step-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.cfpf-step-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.cfpf-step-number {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    background: #fff;
    color: #667eea;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.cfpf-step-card.active .cfpf-step-number {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.cfpf-step-card.completed .cfpf-step-number {
    background: #4CAF50;
    color: white;
}

.cfpf-step-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.cfpf-step-card.active .cfpf-step-card-title {
    color: white;
}

.cfpf-step-card.completed .cfpf-step-card-title {
    color: #2e7d32;
}

/* Progress Bar */
.cfpf-reg-progress {
    margin-bottom: 30px;
}

.cfpf-reg-progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cfpf-reg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
    width: 0%;
}

.cfpf-reg-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

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

.cfpf-reg-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

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

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

.cfpf-reg-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Steps */
.cfpf-reg-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cfpf-step-title {
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cfpf-step-fields {
    margin-bottom: 30px;
}

/* Field Groups - Grid Layout */
.cfpf-fields-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cfpf-field-group {
    margin-bottom: 0;
}

.cfpf-field-group.full-width {
    grid-column: 1 / -1;
}

.cfpf-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cfpf-label.required::after {
    content: ' *';
    color: #e53935;
    font-weight: 700;
}

.cfpf-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.cfpf-input:hover {
    border-color: #bdbdbd;
    background: #fff;
}

.cfpf-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.cfpf-input.error {
    border-color: #e53935;
    background: #ffebee;
}

/* Date Input Styling with Mask */
.cfpf-date-mask {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    font-size: 16px;
    font-weight: 500;
}

.cfpf-date-mask::placeholder {
    letter-spacing: 1px;
    font-weight: 400;
    color: #999;
}

.cfpf-date-mask:focus::placeholder {
    color: #bbb;
}

/* Password Strength Indicator */
.cfpf-password-strength {
    margin-top: 10px;
}

.cfpf-password-strength-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cfpf-password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.cfpf-password-strength-fill.weak {
    width: 33%;
    background: linear-gradient(90deg, #f44336, #e53935);
}

.cfpf-password-strength-fill.medium {
    width: 66%;
    background: linear-gradient(90deg, #ff9800, #fb8c00);
}

.cfpf-password-strength-fill.strong {
    width: 100%;
    background: linear-gradient(90deg, #4CAF50, #43a047);
}

.cfpf-password-strength-text {
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    min-height: 18px;
}

.cfpf-password-strength-text.weak {
    color: #f44336;
}

.cfpf-password-strength-text.medium {
    color: #ff9800;
}

.cfpf-password-strength-text.strong {
    color: #4CAF50;
}

/* Radio and Checkbox Groups */
.cfpf-radio-group,
.cfpf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cfpf-radio-option,
.cfpf-checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cfpf-radio-option:hover,
.cfpf-checkbox-option:hover {
    background-color: #f5f5f5;
    border-color: #4CAF50;
}

.cfpf-radio-option input,
.cfpf-checkbox-option input {
    margin: 0;
    cursor: pointer;
}

/* Info Box */
.cfpf-info-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 4px;
    padding: 15px;
    color: #1565c0;
    font-size: 14px;
    line-height: 1.6;
}

/* Step Navigation */
.cfpf-step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.cfpf-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.cfpf-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cfpf-btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.cfpf-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cfpf-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cfpf-btn-secondary {
    background: #9e9e9e;
    color: white;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
}

.cfpf-btn-secondary:hover:not(:disabled) {
    background: #757575;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(117, 117, 117, 0.4);
}

.cfpf-btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    flex: 1;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.cfpf-btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Loading State */
.cfpf-btn.loading {
    position: relative;
    color: transparent;
}

.cfpf-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .cfpf-registration-form-wrapper {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .cfpf-registration-form-wrapper {
        max-width: 95%;
        padding: 25px;
        margin: 10px auto;
    }

    .cfpf-reg-title {
        font-size: 26px;
    }

    .cfpf-step-title {
        font-size: 20px;
    }

    .cfpf-steps-navigation {
        gap: 10px;
    }

    .cfpf-step-card {
        min-width: 120px;
        padding: 15px 10px;
    }

    .cfpf-step-number {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 14px;
    }

    .cfpf-step-card-title {
        font-size: 12px;
    }

    .cfpf-fields-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cfpf-step-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .cfpf-btn {
        width: 100%;
        padding: 14px 30px;
    }
}

@media (max-width: 480px) {
    .cfpf-registration-form-wrapper {
        padding: 20px;
    }

    .cfpf-reg-title {
        font-size: 22px;
    }

    .cfpf-step-card {
        min-width: 100px;
        padding: 12px 8px;
    }

    .cfpf-step-card-title {
        font-size: 11px;
    }
}

/* Field Validation Errors */
.cfpf-field-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Success Animation */
@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.cfpf-registration-form-wrapper.success {
    animation: successPulse 0.5s ease;
}