/* EstimateApp PDF Button Styles */

.estimateapp-pdf-button-wrapper {
    margin: 20px 0;
    text-align: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.estimateapp-pdf-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.estimateapp-pdf-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
}

.estimateapp-pdf-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
}

.estimateapp-pdf-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.estimateapp-pdf-button .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 1 !important;
}

/* Loading Animation */
.estimateapp-loading {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Message Styles */
.estimateapp-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.estimateapp-message.estimateapp-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border-left: 4px solid #2E7D32;
}

.estimateapp-message.estimateapp-error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border-left: 4px solid #C62828;
}

.estimateapp-message.estimateapp-info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-left: 4px solid #1565C0;
}

/* Animation Keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .estimateapp-pdf-button {
        width: 100% !important;
        justify-content: center !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important; /* タッチターゲットの最小サイズ */
    }
    
    .estimateapp-message {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 10px;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    /* スマホでのPDF表示改善 */
    .estimateapp-pdf-button-wrapper {
        margin: 15px 0;
    }
}

/* スマホ専用スタイル */
@media (max-width: 480px) {
    .estimateapp-pdf-button {
        font-size: 15px !important;
        padding: 16px 20px !important;
    }
    
    .estimateapp-message {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* WooCommerce Theme Compatibility */
.woocommerce .estimateapp-pdf-button-wrapper {
    margin: 15px 0;
}

.woocommerce .estimateapp-pdf-button {
    background: linear-gradient(135deg, #a46497 0%, #8a4b7a 100%) !important;
}

.woocommerce .estimateapp-pdf-button:hover {
    background: linear-gradient(135deg, #8a4b7a 0%, #6a3a5a 100%) !important;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .estimateapp-pdf-button {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
        color: #f7fafc !important;
    }
    
    .estimateapp-pdf-button:hover {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
    }
    
    .estimateapp-loading {
        color: #a0aec0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .estimateapp-pdf-button {
        border: 2px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .estimateapp-pdf-button:hover {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Print Styles */
@media print {
    .estimateapp-pdf-button-wrapper {
        display: none !important;
    }
}

/* Focus Styles for Accessibility */
.estimateapp-pdf-button:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .estimateapp-pdf-button {
        transition: none !important;
    }
    
    .estimateapp-message {
        animation: none !important;
    }
} 