/**
 * SPD Private Seller Form Styles
 */

/* Form Container */
.spd-psf-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    box-sizing: border-box;
}

/* Field Groups */
.spd-psf-field-group {
    margin-bottom: 20px;
}

.spd-psf-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.spd-psf-field-label .required {
    color: #ff0000;
    margin-left: 3px;
}

/* Input Fields */
.spd-psf-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    box-sizing: border-box;
    border-style: solid;
    transition: all 0.3s ease;
}

.spd-psf-input:focus {
    outline: none;
    border-color: #5469d4;
}

/* Character Counter */
.spd-psf-char-count {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Images Section */
.spd-psf-images-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.spd-psf-images-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Image Upload */
.spd-psf-image-upload-wrapper {
    position: relative;
}

.spd-psf-image-upload-btn {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    border-style: solid;
    transition: all 0.3s ease;
}

.spd-psf-image-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.spd-psf-image-preview {
    margin-top: 10px;
}

.spd-psf-image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Payment Section */
.spd-psf-payment-section {
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.spd-psf-payment-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.spd-psf-payment-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 4px;
}

.spd-psf-payment-summary p {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
}

.spd-psf-total {
    font-size: 18px;
    font-weight: bold;
    padding-top: 10px;
    border-top: 2px solid #ddd;
    margin-top: 10px !important;
}

.spd-psf-checkbox-label {
    display: block;
    margin-top: 15px;
    cursor: pointer;
}

/* Credit Card Container */
.spd-psf-credit-card-container {
    margin: 30px 0;
    perspective: 1000px;
}

.spd-psf-credit-card-flipper {
    position: relative;
    width: 350px;
    height: 220px;
    margin: 0 auto 30px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.spd-psf-credit-card-flipper.flipped {
    transform: rotateY(180deg);
}

.spd-psf-credit-card {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 25px;
    box-sizing: border-box;
    backface-visibility: hidden;
    border-style: solid;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: white;
}

.spd-psf-card-front {
    z-index: 2;
}

.spd-psf-card-back {
    transform: rotateY(180deg);
}

/* Card Front Elements */
.spd-psf-card-logo {
    text-align: right;
    font-size: 28px;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 15px;
}

.spd-psf-card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 6px;
    margin-bottom: 15px;
    position: relative;
}

.spd-psf-card-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 25px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 3px;
}

.spd-psf-card-number {
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: -10px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.spd-psf-card-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.spd-psf-card-name {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spd-psf-card-expiry {
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

/* Card Back Elements */
.spd-psf-card-stripe {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 50px;
    background: #000;
}

.spd-psf-card-cvc-container {
    position: absolute;
    top: 90px;
    right: 25px;
    width: 60px;
    height: 40px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spd-psf-card-cvc {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Stripe Elements Styling */
.spd-psf-stripe-element {
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    min-height: 44px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.spd-psf-stripe-element:hover {
    border-color: #999999;
}

.spd-psf-stripe-element.StripeElement--focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.spd-psf-stripe-element.StripeElement--invalid {
    border-color: #ff0000;
}

.spd-psf-stripe-element.StripeElement--complete {
    border-color: #28a745;
}

/* Credit Card Input Fields */
.spd-psf-cc-input {
    padding: 12px 15px;
    border-style: solid;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.spd-psf-cc-input:hover {
    border-color: #999;
}

.spd-psf-card-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Submit Button */
.spd-psf-submit-wrapper {
    margin-top: 30px;
    text-align: center;
}

.spd-psf-submit-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    background: #5469d4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spd-psf-submit-btn:hover {
    background: #4055b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(84, 105, 212, 0.3);
}

.spd-psf-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.spd-psf-loading {
    margin-top: 10px;
    font-size: 16px;
    color: #666;
}

/* Messages */
.spd-psf-form-message,
.spd-psf-error-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

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

.spd-psf-form-message.error,
.spd-psf-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spd-psf-form-container {
        padding: 20px;
    }

    .spd-psf-credit-card-flipper {
        width: 100%;
        max-width: 350px;
        height: auto;
        aspect-ratio: 1.586;
    }

    .spd-psf-card-details-row {
        grid-template-columns: 1fr;
    }

    .spd-psf-card-number {
        font-size: 20px;
    }
}

/* Stripe Elements Customization */
.StripeElement {
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
}

.StripeElement--focus {
    border-color: #5469d4;
    box-shadow: 0 0 0 1px #5469d4;
}

.StripeElement--invalid {
    border-color: #fa755a;
}

.StripeElement--webkit-autofill {
    background-color: #fefde5 !important;
}
