.pdfinvx-form-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 40px;
}
.pdfinvx-settings-form {
    width: 100%;
}
.pdfinvx-form-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
}
.pdfinvx-tab-content#pdfinvx_general h2,
.pdfinvx-tab-content#pdfinvx_template h2,
.pdfinvx-tab-content#pdfinvx_emails h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin: 0 0 32px;
}
.pdfinvx-tab-content {
    padding: 40px 0;
}
.pdfinvx-field {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}
.pdfinvx-tab-content#pdfinvx_template .pdfinvx-field,
.pdfinvx-tab-content#pdfinvx_emails .pdfinvx-field {
    margin-bottom: 40px;
}
.pdfinvx-field label {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}
.pdfinvx-field-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pdfinvx-field input[type="text"],
.pdfinvx-field select {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.pdfinvx-field input[type="text"]:focus,
.pdfinvx-field select:focus {
    border: 2px solid #7f54b3;
    background: #f8fafc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.2);
}
.pdfinvx-field textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    resize: vertical;
    transition: all 0.3s ease;
}
.pdfinvx-field textarea:focus {
    border: 2px solid #7f54b3;
    background: #f8fafc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.2);
}
.pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.pdfinvx-tab-content#pdfinvx_emails .pdfinvx-checkbox {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease;
}
.pdfinvx-tab-content#pdfinvx_emails .pdfinvx-checkbox:hover {
    background: #f0f0f1;
    border-color: #c3c4c7;
}
.pdfinvx-tab-content#pdfinvx_emails .pdfinvx-checkbox input {
    margin: 0 12px 0 0;
}
.pdfinvx-checkbox-label {
    font-size: 15px;
    font-weight: 500;
    color: #1d2327;
}
.pdfinvx-upload-logo {
    background: #7f54b3 !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    width: 200px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease !important;
}
.pdfinvx-upload-logo:hover {
    background: #6843a0 !important;
    transform: scale(1.03);
}
.pdfinvx-upload-logo::before {
    content: "\f317";
    font-family: "dashicons";
    font-size: 18px;
    line-height: 1;
}
.pdfinvx-logo-preview {
    width: 200px;
    margin-top: 16px;
    padding: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f9f9f9;
    display: inline-block;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
.pdfinvx-logo-preview img {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.pdfinvx-button {
    background: #7f54b3 !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.pdfinvx-button:hover {
    background: #6843a0 !important;
    transform: scale(1.03);
}
.pdfinvx-button.disabled {
    background: #dcdcde !important;
    color: #3c434a !important;
    cursor: not-allowed;
    transform: none;
}
.pdfinvx-button .spinner {
    margin: -2px 8px 0 0;
    float: none;
}
#wpbody-content .wrap .pdfinvx-button {
    margin: 16px 0;
    width: 200px;
}
.woo-nav-tab-wrapper {
    margin: 24px 0 0;
    border-bottom: 2px solid #7f54b3;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
.nav-tab {
    background: #f8f8f8;
    color: #505050;
    border: none !important;
    margin: 0 8px 0 0;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    box-shadow: none !important;
}
.nav-tab-active,
.nav-tab:active,
.nav-tab:hover {
    background: #7f54b3 !important;
    color: #ffffff !important;
}
.description {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}
.pdfinvx-field-prefix,
.pdfinvx-field-suffix {
    width: 100%;
}
.pdfinvx-field-prefix + .pdfinvx-field-suffix {
    margin-top: -24px;
}
.pdfinvx-field-prefix-suffix-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}
@media (min-width: 768px) {
    .pdfinvx-field-prefix,
    .pdfinvx-field-suffix {
        flex: 1;
    }
    .pdfinvx-field-prefix + .pdfinvx-field-suffix {
        margin-top: 0;
    }
}
.pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}
.pdfinvx-template-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: #ffffff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    cursor: pointer;
}
.pdfinvx-template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    border-color: #c3c4c7;
}
.pdfinvx-template-selected {
    border: 2px solid #7f54b3;
    box-shadow: 0 0 0 3px rgba(127, 84, 179, 0.2);
}
.pdfinvx-template-preview {
    position: relative;
    overflow: hidden;
    height: 300px;
    background: #f8fafc;
}
.pdfinvx-template-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.pdfinvx-template-card:hover .pdfinvx-template-preview img {
    transform: scale(1.05);
}
.pdfinvx-template-selected-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #7f54b3;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.pdfinvx-template-info {
    padding: 20px;
}
.pdfinvx-template-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: #1d2327;
}
.pdfinvx-template-info p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}
.pdfinvx-template-actions {
    display: flex;
    padding: 16px 20px;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #f0f0f1;
}
.pdfinvx-preview-template {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f0f0f1 !important;
    color: #2c3338 !important;
    border: 1.5px solid #c3c4c7 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
}
.pdfinvx-preview-template:hover {
    background: #e2e4e7 !important;
    transform: scale(1.03);
}
.pdfinvx-preview-template .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.pdfinvx-template-select {
    display: flex;
    align-items: center;
    background: #7f54b3;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}
.pdfinvx-template-select:hover {
    background: #6843a0;
    transform: scale(1.03);
}
.pdfinvx-template-select input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.pdfinvx-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}
.pdfinvx-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    position: relative;
    animation: pdfInvoiceXModalOpen 0.3s ease-out;
}
@keyframes pdfInvoiceXModalOpen {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.pdfinvx-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #6b7280;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}
.pdfinvx-modal-close:hover {
    color: #1d2327;
}
.pdfinvx-modal-title {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
}
.pdfinvx-modal-body {
    margin-bottom: 24px;
    max-height: 65vh;
    overflow-y: auto;
    text-align: center;
}
#pdfinvx-preview-image {
    max-width: 100%;
    height: auto;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
}
.pdfinvx-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.pdfinvx-footer {
    float: right;
}

.heart {
	display: inline-block;
	color: red;
	animation: heartPulse 1.2s infinite ease-in-out;
}

@keyframes heartPulse {
	0% {
		transform: scale(1);
	}

	15% {
		transform: scale(1.3);
	}

	30% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.2);
	}

	70% {
		transform: scale(1);
	}

	100% {
		transform: scale(1);
	}
}
/* Very small screens (e.g., iPhone SE, <400px) */
@media (max-width: 399px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: 1fr;
    }
    .pdfinvx-form-wrapper {
        padding: 16px;
    }
    .pdfinvx-form-inner {
        padding: 0 8px;
    }
    .pdfinvx-field-prefix + .pdfinvx-field-suffix {
        margin-top: 32px;
    }
    .pdfinvx-logo-preview img {
        max-width: 100%;
    }
}

/* Small screens (400px–600px, e.g., most phones) */
@media (min-width: 400px) and (max-width: 600px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: 1fr;
    }
    .pdfinvx-form-wrapper {
        padding: 24px;
    }
    .pdfinvx-form-inner {
        padding: 0 16px;
    }
    .pdfinvx-field-prefix + .pdfinvx-field-suffix {
        margin-top: 48px;
    }
    .pdfinvx-logo-preview img {
        max-width: 100%;
    }
}

/* Large phones/small tablets (601px–768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets and small laptops (769px–1120px, e.g., 720p) */
@media (min-width: 769px) and (max-width: 1120px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium laptops (1121px–1399px) */
@media (min-width: 1121px) and (max-width: 1399px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large screens (1400px+, e.g., 1440p, 1080p) */
@media (min-width: 1400px) {
    .pdfinvx-tab-content#pdfinvx_emails .pdfinvx-emails-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .pdfinvx-tab-content#pdfinvx_template .pdfinvx-templates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}