/* ==========================================================================
   WT Download Dialog – styles for the email-gate modal and download button
   ========================================================================== */

/* ── Download button ─────────────────────────────────────────────────────── */
.wt-download-btn-wrap {
    display: inline-block;
    margin-left: 12px;
    vertical-align: middle;
}

.wt-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    background-color: #678718;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
    line-height: 1.4;
    font-family: inherit;
}

.wt-download-btn:hover,
.wt-download-btn:focus {
    background-color: #fff;
    color: #DE9829 !important;
	text-decoration: none;
	border: 1px solid #DE9829;
    outline: none;
    transform: translateY(-1px);
}

.wt-download-btn svg {
    flex-shrink: 0;
}

/* ── Dialog backdrop ─────────────────────────────────────────────────────── */
.wt-dl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wt-dl-overlay.is-open {
    display: flex;
    animation: wt-dl-fade-in 0.18s ease;
}

@keyframes wt-dl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Dialog box ──────────────────────────────────────────────────────────── */
.wt-dl-dialog {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 460px;
    padding: 32px 36px;
    position: relative;
    animation: wt-dl-slide-up 0.22s ease;
}

@keyframes wt-dl-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wt-dl-dialog__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.wt-dl-dialog__close:hover {
    color: #333;
    background: #f0f0f0;
}

.wt-dl-dialog__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0f5e0;
    margin: 0 auto 16px;
    color: #678718;
}

.wt-dl-dialog__title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin: 0 0 8px;
}

.wt-dl-dialog__desc {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.wt-dl-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wt-dl-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.wt-dl-form__input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    color: #2d3748;
    font-family: inherit;
}

.wt-dl-form__input:focus {
    border-color: #678718;
    box-shadow: 0 0 0 3px rgba(103, 135, 24, 0.15);
}

.wt-dl-form__input.has-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.wt-dl-form__error {
    font-size: 12px;
    color: #e53e3e;
    margin-top: 8px;
    display: none;
}

.wt-dl-form__error.is-visible {
    display: block;
}

.wt-dl-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #DE9829;
    color: #F8F9FA;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.wt-dl-form__submit:hover:not(:disabled) {
    background: #F8F9FA;
	color: #DE9829 !important;
	text-decoration: none;
}

.wt-dl-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner inside submit button */
.wt-dl-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wt-dl-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.wt-dl-form__submit.is-loading .wt-dl-spinner {
    display: inline-block;
}

.wt-dl-form__submit.is-loading .wt-dl-btn-text {
    display: none;
}

@keyframes wt-dl-spin {
    to { transform: rotate(360deg); }
}

/* ── Success state ───────────────────────────────────────────────────────── */
.wt-dl-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 8px 0;
}

.wt-dl-success.is-visible {
    display: flex;
}

.wt-dl-success__icon {
    color: #678718;
}

.wt-dl-success__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.wt-dl-success__desc {
    font-size: 14px;
    color: #718096;
    margin: 0;
    line-height: 1.6;
}

.wt-dl-success__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #678718;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    margin-top: 4px;
}

.wt-dl-success__link:hover {
    background: #4d6210;
    color: #fff;
}

input#wt-dl-email {
    width: 100% !important;
    padding: 0px 14px !important;
    border: 1px solid #e5c9a6;
    border-radius: 10px !important;
    height: 48px !important;
    line-height: 48px !important;
    background-color: #F8F9FA !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .wt-dl-dialog {
        padding: 20px 16px;
    }
	
	.wt-dl-form__submit {
		font-size: 14px;
	}
	
	.wt-dl-dialog__title {
    	font-size: 18px;
	}
}
