/* Public Styles dla Bonów Podarunkowych */

/* Formularz bonu na stronie produktu */
.gv-voucher-form {
    margin-bottom: 25px;
    padding: 25px;
    background: #f9f9f9;
    border: 2px solid #61ce82;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(97, 206, 130, 0.1);
}

.gv-voucher-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #61ce82;
    font-size: 20px;
    font-weight: 600;
}

.gv-voucher-form .form-row {
    margin-bottom: 20px;
}

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

.gv-voucher-form label small {
    font-weight: normal;
    color: #666;
    font-style: italic;
}

.gv-voucher-form .required {
    color: #d63638;
    font-weight: bold;
}

.gv-voucher-form input[type="text"],
.gv-voucher-form input[type="email"],
.gv-voucher-form input[type="number"],
.gv-voucher-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.gv-voucher-form input:focus,
.gv-voucher-form textarea:focus {
    outline: none;
    border-color: #61ce82;
    box-shadow: 0 0 0 3px rgba(97, 206, 130, 0.1);
}

.gv-voucher-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.gv-voucher-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Info box w formularzu */
.gv-voucher-form > div[style*="border-left"] {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-left: 4px solid #8bc34a !important;
    border-radius: 4px;
}

.gv-voucher-form > div[style*="border-left"] strong {
    color: #8bc34a;
    font-size: 15px;
}

.gv-voucher-form > div[style*="border-left"] ul {
    margin: 15px 0 0 20px;
    padding: 0;
    color: #666;
    line-height: 1.8;
}

.gv-voucher-form > div[style*="border-left"] li {
    margin: 8px 0;
}

/* Balance checker shortcode */
.gv-balance-checker {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 30px auto;
}

.gv-balance-checker h3 {
    margin-top: 0;
    color: #61ce82;
    font-size: 22px;
    text-align: center;
    margin-bottom: 25px;
}

.gv-balance-checker form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.gv-balance-checker input[type="text"] {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: border-color 0.3s;
}

.gv-balance-checker input[type="text"]:focus {
    outline: none;
    border-color: #61ce82;
}

.gv-balance-checker button {
    padding: 12px 30px;
    background: #8bc34a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

.gv-balance-checker button:hover {
    background: #7cb342;
    transform: translateY(-2px);
}

.gv-balance-checker button:active {
    transform: translateY(0);
}

#gv-balance-result {
    margin-top: 25px;
    min-height: 50px;
}

/* Kupon w koszyku */
.gv-coupon-info {
    background: #f0f9f4;
    padding: 15px;
    border-left: 4px solid #61ce82;
    border-radius: 4px;
    margin-top: 10px;
	line-height: normal;
}

.gv-coupon-info strong {
    color: #333;
    font-size: 15px;
}

.gv-coupon-info small {
    color: #666;
    line-height: 1.6;
}

/* WooCommerce message boxes */
.woocommerce-message[style*="#f0f9f4"] {
    background: #f0f9f4 !important;
    border-left: 4px solid #61ce82 !important;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .gv-voucher-form {
        padding: 20px 15px;
    }
    
    .gv-voucher-form h3 {
        font-size: 18px;
    }
    
    .gv-balance-checker {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .gv-balance-checker form {
        flex-direction: column;
    }
    
    .gv-balance-checker input[type="text"],
    .gv-balance-checker button {
        width: 100%;
    }
    
    .gv-balance-checker button {
        margin-left: 0 !important;
        margin-top: 10px;
    }
}

/* Print styles dla emaili */
@media print {
    body {
        font-family: Arial, sans-serif;
        color: #000;
    }
    
    .no-print {
        display: none !important;
    }
    
    .email-container {
        box-shadow: none !important;
        max-width: 100% !important;
    }
    
    .voucher-code-box {
        border: 2px solid #61ce82 !important;
        background: white !important;
        color: #000 !important;
        page-break-inside: avoid;
    }
    
    .voucher-code {
        color: #000 !important;
    }
    
    .instructions {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    a[href]:after {
        content: none !important;
    }
}

/* Animation dla success messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gv-coupon-info,
#gv-balance-result > div {
    animation: slideIn 0.3s ease-out;
}

/* Ikony emoji w formularzach */
.gv-voucher-form h3::before,
.gv-balance-checker h3::before {
    margin-right: 10px;
}

/* Input validation states */
.gv-voucher-form input:invalid:not(:placeholder-shown) {
    border-color: #d63638;
}

.gv-voucher-form input:valid:not(:placeholder-shown) {
    border-color: #61ce82;
}

/* Success/Error result boxes */
#gv-balance-result > div {
    padding: 20px;
    border-radius: 8px;
    line-height: 1.6;
}

#gv-balance-result h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

#gv-balance-result p {
    margin: 10px 0;
    font-size: 14px;
}

/* Loading spinner */
.gv-loading {
    text-align: center;
    padding: 20px;
}

.gv-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #61ce82;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* WooCommerce checkout - kupon info */
.woocommerce-checkout .gv-coupon-info {
    margin: 15px 0;
}

/* Cart totals area */
.cart_totals .gv-coupon-info {
    font-size: 14px;
    line-height: 1.8;
}

/* Thank you page styling */
.woocommerce-order .woocommerce-message[style*="border-left: 4px solid #61ce82"] {
    margin: 20px 0;
    padding: 20px;
}

.woocommerce-order .woocommerce-message strong {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Akcenty zieleni w całej wtyczce */
.gv-accent-primary {
    color: #61ce82;
}

.gv-accent-secondary {
    color: #8bc34a;
}

.gv-bg-primary {
    background-color: #61ce82;
}

.gv-bg-secondary {
    background-color: #8bc34a;
}

/* Tooltips */
.gv-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.gv-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #333;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.gv-tooltip:hover::after {
    opacity: 1;
}

/* Accessibility improvements */
.gv-voucher-form input:focus,
.gv-voucher-form textarea:focus,
.gv-balance-checker input:focus,
.gv-balance-checker button:focus {
    outline: 2px solid #61ce82;
    outline-offset: 2px;
}

/* Screen reader only text */
.gv-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

dl.variation {
    line-height: 15px;
}