/**
 * Quick Purchase Form Styles
 */

.qp-wrapper {

margin-top: 24px;
height: 88%;
}

.qp-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.4;
}

.qp-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    position: relative;
}

.qp-field {
    position: relative;
}

.qp-input {
    width: 100%;
    background: #1A1E41 !important;
    border: 1px solid #5464EB !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    line-height: 1;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 56px;
    width: 100%;
}

.qp-input:focus {
    outline: none;
    border-color: #5865f2;
    background: #32354a;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.qp-input::placeholder {
    color: #FFFFFF66;
}

.qp-input-error {
    border-color: #ed4245 !important;
    background: #2d1f20 !important;
}

.qp-input-error:focus {
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.1) !important;
}

.qp-error {
    display: block;
    color: #ed4245;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 4px;
}

.qp-submit {
    width: 100%;
    padding: 16px;
    background: #5865f2;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: absolute;
    bottom: 0;
}

.qp-submit:hover:not(:disabled) {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4);
}

.qp-submit:active:not(:disabled) {
    transform: translateY(0);
}

.qp-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.qp-submit.qp-loading {
    pointer-events: none;
    padding-right: 48px;
}
/* Price Display */

.qp-price-wrapper{
    position: absolute;
    bottom: 88px;
}
.qp-price {
    color: #ffffff;
    font-size: 40px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qp-price .woocommerce-Price-amount {
    color: #ffffff;
    font-size: 40px;
    font-weight: 600;
}

.qp-price ins {
    text-decoration: none;
    color: #43b581;
}

.qp-price del {
    opacity: 0.6;
    margin-right: 8px;
    font-size: 16px;
}

/* Price placeholder (многоточие) */
.qp-price-placeholder {
    color: #8e91a8;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 2px;
}

.qp-submit.qp-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: qp-spin 0.6s linear infinite;
}

@keyframes qp-spin {
    to { 
        transform: rotate(360deg); 
    }
}

.qp-messages {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
    margin-top: 8px;
}

.qp-messages.qp-error {
    background: rgba(237, 66, 69, 0.15);
    border: 1px solid rgba(237, 66, 69, 0.5);
    color: #ed4245;
    display: block;
}

.qp-messages.qp-success {
    background: rgba(67, 181, 129, 0.15);
    border: 1px solid rgba(67, 181, 129, 0.5);
    color: #43b581;
    display: block;
}

.qp-error-icon {
    font-weight: bold;
    margin-right: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .qp-wrapper {
        padding: 20px 16px;
        margin: 16px 0;
    }
    
    .qp-title {
        font-size: 16px;
    }
    
    .qp-input {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 12px 14px;
    }
    
    .qp-submit {
        padding: 14px;
        font-size: 15px;
        position: relative;
    }
    .qp-price-wrapper{
    position: relative;
    bottom: 0px;
    }
}

/* Dark theme compatibility */
body.dark-mode .qp-wrapper,
.dark-theme .qp-wrapper {
    background: #1a1d2e;
}

/* RTL Support */
[dir="rtl"] .qp-submit.qp-loading {
    padding-right: 16px;
    padding-left: 48px;
}

[dir="rtl"] .qp-submit.qp-loading::after {
    right: auto;
    left: 16px;
}
