/**
 * Invoice Styles for Sitetrail License Manager
 * Customer account invoice buttons and print optimization
 */

/* Invoice buttons in customer account */
.sitetrail-invoice-buttons {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007cba;
}

.sitetrail-invoice-buttons h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.sitetrail-invoice-button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Use WooCommerce button styling - just add loading state */
.sitetrail-download-invoice.loading,
.sitetrail-email-invoice.loading {
    position: relative;
    color: transparent;
}

.sitetrail-download-invoice.loading::after,
.sitetrail-email-invoice.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Company fields in account form */
.sitetrail-company-fields {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.sitetrail-company-fields h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.sitetrail-company-fields .form-row {
    margin-bottom: 15px;
}

.sitetrail-company-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.sitetrail-company-fields input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.sitetrail-company-fields input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Success/error messages */
.sitetrail-invoice-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.sitetrail-invoice-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sitetrail-invoice-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .sitetrail-invoice-button-group {
        flex-direction: column;
    }
    
    .sitetrail-invoice-button-group .button {
        text-align: center;
    }
    
    .sitetrail-company-fields {
        padding: 15px;
    }
}

/* Print styles for invoice buttons */
@media print {
    .sitetrail-invoice-buttons,
    .sitetrail-company-fields {
        display: none;
    }
} 