/* Widget Price Inquiry - Style CSS */

.piw-widget {
    display: inline-block;
    width: 100%;
    margin: 0 auto;
    min-height: 50px; /* Stała minimalna wysokość */
    position: relative;
    overflow: hidden;
}

/* Kontener przycisku */
.piw-button-container {
    text-align: left;
    margin: 0;
    padding: 0;
    min-height: 50px;
    display: block;
}

/* Wyrównanie przycisku */
.piw-button-container[style*="text-align: center"] {
    text-align: center;
}

.piw-button-container[style*="text-align: right"] {
    text-align: right;
}

.piw-button-container[style*="text-align: justify"] {
    text-align: justify;
}

.piw-button-container[style*="text-align: justify"] .piw-button,
.piw-button-container.justify .piw-button {
    width: 100% !important;
    display: block !important;
    text-align: center;
}

.piw-button-container[style*="text-align: left"] {
    text-align: left;
}

/* Główny przycisk */
.piw-button {
    display: inline-block;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.piw-button:hover {
    /* Efekty hover będą kontrolowane przez ustawienia Elementor */
}

.piw-button:active {
    /* Efekty active będą kontrolowane przez ustawienia Elementor */
}

/* Formularz */
.piw-form {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    min-height: 50px; /* Stała wysokość */
    display: none; /* Ukryty domyślnie */
}

.piw-form-content {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 50px;
}


/* Pole email */
.piw-email-input {
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    margin: 0;
    margin-right: 8px;
}

.piw-email-input:focus {
    outline: none;
    border-color: #007cba;
}

.piw-email-input.piw-input-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Przyciski formularza - w jednej linii z polem email */
.piw-form-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.piw-send-button,
.piw-cancel-button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.piw-send-button {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.piw-send-button:hover:not(:disabled) {
    /* Efekty hover będą kontrolowane przez ustawienia Elementor */
}

.piw-send-button:active:not(:disabled) {
    /* Efekty active będą kontrolowane przez ustawienia Elementor */
}

.piw-send-button:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.piw-cancel-button {
    background-color: #ffffff;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.piw-cancel-button:hover {
    /* Efekty hover będą kontrolowane przez ustawienia Elementor */
}

.piw-cancel-button:active {
    /* Efekty active będą kontrolowane przez ustawienia Elementor */
}

/* Komunikaty */
.piw-message {
    font-size: 14px;
    line-height: 1.5;
    display: none; /* Ukryty domyślnie */
}

.piw-message-success {
    text-align: center;
    padding: 0;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px; /* Dokładnie taka sama wysokość jak formularz */
}

.piw-message-error {
    text-align: left;
    padding: 0;
    margin: 3px 0 0 0;
    color: #dc3545;
}


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

/* Responsywność */
@media (max-width: 768px) {
    .piw-widget {
        max-width: 100%;
    }
    
    .piw-form-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .piw-email-input {
        margin: 0;
        margin-bottom: 10px;
    }
    
    .piw-form-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .piw-send-button,
    .piw-cancel-button {
        flex: 1;
    }
    
    .piw-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .piw-form-content {
        padding: 0;
    }
    
    .piw-email-input {
        font-size: 13px;
    }
    
    .piw-send-button,
    .piw-cancel-button {
        font-size: 12px;
    }
}

/* Dodatkowe style dla lepszej integracji z Elementor */
.elementor-widget-price-inquiry-widget .piw-widget {
    width: 100%;
}

/* Style dla trybu edycji Elementor */
.elementor-editor-active .piw-widget {
    pointer-events: auto;
}



/* Hover efekty dla całego widgetu */
.piw-widget:hover .piw-button {
    /* Usunięto efekty shadow */
}

/* Focus styles dla dostępności */
.piw-button:focus,
.piw-send-button:focus,
.piw-cancel-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.piw-email-input:focus {
    outline: none;
}


/* Accessibility improvements */
.piw-widget[aria-hidden="true"] {
    display: none;
}

.piw-form[aria-hidden="true"] {
    display: none !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .piw-button {
        border: 2px solid currentColor;
    }
    
    .piw-email-input {
        border: 2px solid currentColor;
    }
    
    .piw-form {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .piw-button,
    .piw-send-button,
    .piw-cancel-button,
    .piw-email-input {
        transition: none;
    }
    
    .piw-button:hover,
    .piw-send-button:hover,
    .piw-cancel-button:hover {
        transform: none;
        box-shadow: none;
    }
    
}
