/**
 * Print & PDF Generator - Styles - Versão 1.0.23
 * Version: 1.0.23
 */

/* Container principal dos botões */
.ppg-buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Posições dos botões */
.ppg-position-top {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    backdrop-filter: blur(10px);
}

.ppg-position-bottom {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    backdrop-filter: blur(10px);
}

.ppg-position-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Estilos base dos botões */
.ppg-button {
    display: inline-flex;
    flex-direction: column !important;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Forçar layout vertical para todos os botões */
.ppg-button,
.ppg-button * {
    flex-direction: column !important;
}

/* Container dos ícones e texto */
.ppg-button-icon {
    display: block;
    margin-bottom: 5px;
}

.ppg-button-text {
    display: block;
    text-align: center;
}

.ppg-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ppg-button:hover:before {
    left: 100%;
}

.ppg-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.ppg-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Ícones */
.ppg-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Botões específicos */
.ppg-print-btn {
    background-color: #007cba;
    color: #ffffff;
}

.ppg-print-btn:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.ppg-pdf-btn {
    background-color: #dc3545;
    color: #ffffff;
}

.ppg-pdf-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.ppg-email-btn {
    background-color: #28a745;
    color: #ffffff;
}

.ppg-email-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Estilos para impressão */
@media print {
    .ppg-buttons-container {
        display: none !important;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .ppg-buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .ppg-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .ppg-position-floating {
        bottom: 10px;
        right: 10px;
        left: 10px;
        flex-direction: row;
        justify-content: center;
    }
}

/* Estilos para o painel de administração */
.ppg-admin-section {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ppg-admin-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.ppg-form-group {
    margin-bottom: 15px;
}

.ppg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ppg-form-group input[type="text"],
.ppg-form-group input[type="url"],
.ppg-form-group select,
.ppg-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ppg-form-group input[type="checkbox"] {
    margin-right: 8px;
}

.ppg-form-group .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Estilos para upload de mídia */
.ppg-media-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ppg-media-upload input[type="text"] {
    flex: 1;
}

.ppg-media-upload button {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ppg-media-upload button:hover {
    background: #005a87;
}

/* Estilos para preview dos botões */
.ppg-preview-section {
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ppg-preview-section h4 {
    margin-top: 0;
    color: #333;
}

/* Estilos para controles de cor personalizados */
.ppg-custom-color-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ppg-custom-color-input input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ppg-custom-color-input input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

/* Estilos para controles de transparência */
.ppg-transparency-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ppg-transparency-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.ppg-transparency-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
}

.ppg-transparency-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
}

.ppg-transparency-control input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Overlay de carregamento */
/* Loading overlay */
.ppg-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Spinner puro para botões */
.ppg-button-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: ppg-spin 1s linear infinite;
    display: inline-block;
}

/* Spinner puro para overlay */
.ppg-pure-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: ppg-spin 1s linear infinite;
    display: block;
}

@keyframes ppg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para os radio buttons */
.ppg-radio-group label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.ppg-radio-group input[type="radio"] {
    margin-right: 8px;
}

/* Estilos para o widget Elementor */
.elementor-widget-ppg_print_pdf_buttons .ppg-buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.elementor-widget-ppg_print_pdf_buttons .ppg-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #007cba;
    color: #ffffff;
}

.elementor-widget-ppg_print_pdf_buttons .ppg-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.elementor-widget-ppg_print_pdf_buttons .ppg-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Responsividade para o widget Elementor */
@media (max-width: 768px) {
    .elementor-widget-ppg_print_pdf_buttons .ppg-buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .elementor-widget-ppg_print_pdf_buttons .ppg-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}
