/**
 * WooCommerce Registration Product - Styles
 */

/* Container */
.wcrp-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.wcrp-registration-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wcrp-registration-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #333;
}

.wcrp-registration-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Form Sections */
.wcrp-form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wcrp-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    color: #333;
}

.wcrp-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.wcrp-optional {
    font-size: 14px;
    font-weight: normal;
    color: #888;
}

/* Form Fields */
.wcrp-form-row {
    margin-bottom: 20px;
}

.wcrp-form-row:last-child {
    margin-bottom: 0;
}

.wcrp-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wcrp-form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.wcrp-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.wcrp-form-field label .required {
    color: #dc3545;
}

.wcrp-form-field input,
.wcrp-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wcrp-form-field input:focus,
.wcrp-form-field select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.wcrp-form-field input::placeholder {
    color: #aaa;
}

/* Password Fields */
.wcrp-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.wcrp-password-wrapper input {
    padding-right: 45px;
}

.wcrp-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcrp-toggle-password:hover {
    color: #333;
}

.wcrp-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.wcrp-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

/* Inline validation status indicator */
.wcrp-input-with-status {
    position: relative;
    display: flex;
    align-items: center;
}

.wcrp-input-with-status input {
    padding-right: 38px;
}

.wcrp-field-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.wcrp-field-status.wcrp-status-valid {
    color: #16a34a;
}

.wcrp-field-status.wcrp-status-invalid {
    color: #dc2626;
}

.wcrp-field-status.wcrp-status-checking {
    color: #888;
}

.wcrp-mini-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wcrp-spin 0.6s linear infinite;
}

.wcrp-validation-msg {
    display: none;
    margin-top: 4px;
    font-size: 12px;
}

.wcrp-validation-msg.wcrp-msg-valid {
    display: block;
    color: #16a34a;
}

.wcrp-validation-msg.wcrp-msg-invalid {
    display: block;
    color: #dc2626;
}

/* Products Grid */
.wcrp-products-grid {
    display: grid;
    gap: 15px;
}

.wcrp-product-card {
    position: relative;
}

.wcrp-product-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wcrp-product-card label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.wcrp-product-card:hover label {
    border-color: #2271b1;
    background: #f8fbfd;
}

.wcrp-product-card input[type="radio"]:checked + label {
    border-color: #2271b1;
    background: #f0f7fc;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.wcrp-product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.wcrp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcrp-product-info {
    flex: 1;
    min-width: 0;
}

.wcrp-product-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wcrp-product-description {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.wcrp-product-description p {
    margin: 0;
}

.wcrp-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

.wcrp-product-price del {
    color: #999;
    font-weight: normal;
    font-size: 14px;
}

.wcrp-product-price ins {
    text-decoration: none;
}

.wcrp-product-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.wcrp-product-check .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #2271b1;
}

.wcrp-product-card input[type="radio"]:checked + label .wcrp-product-check {
    opacity: 1;
    transform: scale(1);
}

/* Submit Section */
.wcrp-form-submit {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}

.wcrp-submit-wrapper {
    margin-bottom: 15px;
}

.wcrp-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 280px;
    padding: 16px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.wcrp-submit-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wcrp-submit-btn:active {
    transform: translateY(0);
}

.wcrp-submit-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wcrp-btn-icon {
    font-size: 20px;
    transition: transform 0.2s;
}

.wcrp-submit-btn:hover .wcrp-btn-icon {
    transform: translateX(3px);
}

.wcrp-submit-note {
    margin: 0;
    font-size: 13px;
    color: #888;
    max-width: 500px;
    margin: 0 auto;
}

/* Loading Spinner */
.wcrp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcrp-spin 0.8s linear infinite;
}

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

/* Messages */
.wcrp-form-messages {
    margin-bottom: 15px;
}

.wcrp-form-messages:empty {
    display: none;
}

.wcrp-message {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.wcrp-message:last-child {
    margin-bottom: 0;
}

.wcrp-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.wcrp-message-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Login Link */
.wcrp-login-link {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.wcrp-login-link p {
    margin: 0;
    color: #666;
}

.wcrp-login-link a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

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

/* Notices */
.wcrp-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wcrp-notice-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.wcrp-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

/* Checkout Notice */
.wcrp-checkout-notice {
    margin-bottom: 20px !important;
}

/* Thank You Page */
.wcrp-registration-success {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.wcrp-registration-success h3 {
    margin: 0 0 10px;
    color: #16a34a;
    font-size: 22px;
}

.wcrp-registration-success p {
    margin: 0 0 15px;
    color: #333;
}

.wcrp-registration-success p:last-child {
    margin-bottom: 0;
}

.wcrp-registration-success .button {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.wcrp-registration-success .button:hover {
    background: #16a34a;
}

/* Responsive */
@media (max-width: 768px) {
    .wcrp-registration-container {
        padding: 15px;
    }
    
    .wcrp-form-row-2col,
    .wcrp-form-row-3col {
        grid-template-columns: 1fr;
    }
    
    .wcrp-product-card label {
        flex-wrap: wrap;
    }
    
    .wcrp-product-image {
        width: 60px;
        height: 60px;
    }
    
    .wcrp-submit-btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .wcrp-registration-header h2 {
        font-size: 22px;
    }
    
    .wcrp-section-title {
        font-size: 16px;
    }
    
    .wcrp-form-section {
        padding: 15px;
    }
    
    .wcrp-product-check {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}
