/**
 * Telemedicine Discount Popup Styles
 * 
 * @package Telemedicine
 * @since 2.0.0
 */

/* ==========================================================================
   Popup Overlay
   ========================================================================== */

.tm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tm-popup-overlay.active {
    opacity: 1;
}

/* ==========================================================================
   Popup Container
   ========================================================================== */

.tm-popup-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: var(--tm-bg-primary);
    border-radius: var(--tm-border-radius-l);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.tm-popup-overlay.active .tm-popup-container {
    transform: scale(1) translateY(0);
}

/* ==========================================================================
   Close Button
   ========================================================================== */

.tm-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tm-bg-secondary);
    border: none;
    border-radius: 100%;
    color: var(--tm-text-headline);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.tm-popup-close:hover {
    background: var(--tm-icon-error);
    color: var(--tm-text-alt-headline);
    transform: rotate(90deg);
}

.tm-popup-close i {
    font-size: 1.25rem;
}

/* ==========================================================================
   Popup Header
   ========================================================================== */

.tm-popup-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--tm-border-color);
}

.tm-popup-logo {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    border: 1px solid var(--tm-border-color);
    border-radius: var(--tm-border-radius-s);
    overflow: hidden;
    background: var(--tm-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tm-popup-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.tm-popup-info {
    flex: 1;
    min-width: 0;
}

.tm-popup-title {
   	margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tm-text-headline);
    line-height: 1.2;
}

.tm-popup-discount-text {
    margin: 0;
    font-size: 0.7rem;
    color: var(--tm-text-faded);
    line-height: 1.2;
}

/* ==========================================================================
   Popup Body
   ========================================================================== */

.tm-popup-body {
    padding: 2rem;
}

.tm-popup-label {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tm-text-headline);
    text-align: center;
}

/* ==========================================================================
   Code Display
   ========================================================================== */

.tm-popup-code-wrapper {
    position: relative;
}

.tm-copy-btn {
    position: absolute;
    top: -12px;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.15rem 0.8rem;
    background: var(--tm-bg-alt-primary);
    border: 1px solid var(--tm-bg-alt-primary);
    border-radius: var(--tm-border-radius-m);
    font-size: .7rem;
    font-weight: 400;
	text-transform: uppercase;
    color: var(--tm-text-alt-headline);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.tm-copy-btn:hover {
    background: var(--tm-color-primary);
    color: var(--tm-text-alt-headline);
    border-color: var(--tm-color-primary);
    transform: translateY(-1px);
}

.tm-copy-btn.copied {
    background: var(--tm-color-primary);
    color: var(--tm-text-alt-headline);
    border-color: var(--tm-color-primary);
}

.tm-copy-btn i {
    font-size: .7rem;
}

.tm-popup-code {
    padding: .5rem;
    background: var(--tm-bg-secondary);
    border: 1px dashed var(--tm-bg-alt-secondary);
    border-radius: var(--tm-border-radius-xl);
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: center;
    color: var(--tm-text-headline);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    user-select: all;
}

/* ==========================================================================
   Popup Footer
   ========================================================================== */

.tm-popup-footer {
    padding: 0 2rem 2rem;
	text-align: center;
}

.tm-btn-large {
    width: 100%;
	max-width: 260px;
    padding: 0.8em 1.5em;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 400;
	border-radius: var(--tm-border-radius-m)
}

.tm-btn-large:hover {
    background: var(--tm-bg-alt-primary);
	color:  var(--tm-text-alt-headline)!important;
}

/* ==========================================================================
   Disclaimer Section
   ========================================================================== */

.tm-popup-disclaimer {
    border-top: 1px solid var(--tm-border-color);
}

.tm-disclaimer-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--tm-text-faded);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tm-disclaimer-toggle:hover {
    background: var(--tm-bg-secondary);
    color: var(--tm-text-headline);
}

.tm-disclaimer-toggle i {
    transition: transform 0.3s ease;
}

.tm-disclaimer-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.tm-disclaimer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tm-disclaimer-content[aria-hidden="false"] {
    max-height: 500px;
}

.tm-popup-discount-info {
    padding: 0 2rem 2rem;
    font-size: 0.6rem;
    line-height: 1.3;
    color: var(--tm-text-faded);
}

.tm-popup-discount-info p {
    margin: 0 0 0.7rem;
}

.tm-popup-discount-info p:last-child {
    margin-bottom: 0;
}

.tm-popup-discount-info ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.tm-popup-discount-info li {
    margin: 0.25rem 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 640px) {
    .tm-popup-container {
        max-height: 95vh;
    }
    
    .tm-popup-header {
        padding: 1rem;
    }
    
    .tm-popup-logo {
        width: 60px;
        height: 60px;
    }
	
	.tm-popup-close{
		top: .5rem;
		right: .5rem;
		width: 2rem;
		height: 2rem;
	}
    
	.tm-popup-body {
        padding: 1rem 1rem 2rem 1rem;
    }
    
    .tm-popup-code {
        font-size: 1.2rem;
    }
	
	.tm-copy-btn{
		gap: 0.2rem;
    	padding: 0.05rem 0.5rem;
		font-size: .6rem;
	}
    
    .tm-disclaimer-toggle {
        padding: 1rem;
    }
    
    .tm-popup-discount-info {
        padding: 0 1rem 1rem 1rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}