/* WooCommerce Quick Checkout Frontend Styles */

.wcqc-widget-container {
    max-width: 100%;
    margin: 0 auto;
}

.wcqc-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wcqc-product-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.wcqc-product-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.wcqc-price {
    font-size: 28px;
    font-weight: bold;
    color: #27ae60;
}

.wcqc-price del {
    color: #999;
    font-size: 22px;
    margin-right: 10px;
}

/* Two Column Grid Layout */
.wcqc-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.wcqc-field {
    display: flex;
    flex-direction: column;
}

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

.wcqc-field label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.wcqc-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.wcqc-field input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.wcqc-field input.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.wcqc-field input::placeholder {
    color: #999;
    font-size: 13px;
}

/* Telegram field specific styling */
.wcqc-field-telegram input {
    direction: ltr;
    text-align: left;
}

.wcqc-field-error {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.wcqc-submit-wrapper {
    margin-top: 25px;
    text-align: center;
}

.wcqc-submit-btn {
    background: #27ae60;
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wcqc-submit-btn:hover:not(:disabled) {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.wcqc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wcqc-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
}

.wcqc-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.wcqc-spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.wcqc-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

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

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

.wcqc-redirect-notice {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

/* RTL Support */
.rtl .wcqc-field label .required {
    margin-left: 0;
    margin-right: 3px;
}

.rtl .wcqc-loading-spinner {
    margin-left: 0;
    margin-right: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wcqc-form {
        padding: 20px;
    }
    
    .wcqc-product-info h3 {
        font-size: 20px;
    }
    
    .wcqc-price {
        font-size: 24px;
    }
    
    /* Stack fields on mobile */
    .wcqc-fields-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wcqc-submit-btn {
        width: 100%;
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Elementor Editor Notice */
.wcqc-editor-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wcqc-form {
        background: #2c2c2c;
    }
    
    .wcqc-product-info {
        border-bottom-color: #444;
    }
    
    .wcqc-product-info h3 {
        color: #f0f0f0;
    }
    
    .wcqc-field label {
        color: #f0f0f0;
    }
    
    .wcqc-field input {
        background: #3c3c3c;
        color: #f0f0f0;
        border-color: #555;
    }
    
    .wcqc-field input:focus {
        border-color: #3498db;
        background: #3c3c3c;
    }
}

/* Success/Failure Pages Styles */
.wcqc-success-page,
.wcqc-failure-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.wcqc-success-icon svg circle,
.wcqc-success-icon svg path {
    fill: none;
}

.wcqc-failure-icon svg circle,
.wcqc-failure-icon svg path {
    fill: none;
}

.wcqc-success-page h2 {
    color: #27ae60;
    margin: 20px 0;
    font-size: 28px;
}

.wcqc-failure-page h2 {
    color: #e74c3c;
    margin: 20px 0;
    font-size: 28px;
}

.wcqc-order-details {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    text-align: right;
}

.wcqc-order-details table {
    width: 100%;
    margin: 15px 0;
}

.wcqc-order-details table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.wcqc-order-details h3,
.wcqc-order-details h4 {
    color: #333;
    margin-bottom: 15px;
}

.wcqc-order-items {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.wcqc-order-items li {
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wcqc-download-links {
    margin: 30px 0;
}

.wcqc-download-link {
    display: block;
    margin: 10px 0;
    padding: 10px 15px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.wcqc-download-link:hover {
    background: #2980b9;
}

.wcqc-actions {
    margin-top: 30px;
}

.wcqc-btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.wcqc-btn-primary {
    background: #27ae60;
    color: white;
}

.wcqc-btn-primary:hover {
    background: #229954;
}

.wcqc-btn-secondary {
    background: #95a5a6;
    color: white;
}

.wcqc-btn-secondary:hover {
    background: #7f8c8d;
}
