/* Custom styles for TempEmailer */
.email-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.email-item:hover {
    background-color: var(--bs-gray-800);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.email-preview {
    font-size: 0.9em;
    line-height: 1.4;
}

.toast-container {
    z-index: 1060;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn {
    border-radius: 0.375rem;
}

.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

.modal-content {
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .email-item {
        padding: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Email content styling */
#modal-content {
    max-height: 500px;
    overflow-y: auto;
    background-color: var(--bs-gray-900);
    color: var(--bs-body-color);
    border-radius: 8px;
}

/* HTML email styling */
#modal-content.html-view {
    background-color: #ffffff;
    color: #000000;
    padding: 20px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    overflow-x: auto;
}

#modal-content.html-view table {
    width: 100%;
    border-collapse: collapse;
}

#modal-content.html-view img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#modal-content.html-view a {
    color: #007bff;
    text-decoration: underline;
}

/* Style for OTP codes and verification codes */
#modal-content.html-view div[style*="font-size: 24px"],
#modal-content.html-view div[style*="text-align: center"] {
    background-color: #f8f9fa !important;
    border: 2px solid #007bff !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin: 20px 0 !important;
    font-weight: bold !important;
    font-size: 28px !important;
    letter-spacing: 2px !important;
}

/* Fix for email tables */
#modal-content.html-view table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 auto !important;
}

#modal-content.html-view td {
    padding: 10px !important;
    vertical-align: top !important;
}

/* Ensure email content is properly styled */
#modal-content.html-view * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ad container styling */
.ad-container {
    min-height: 9px; /* Reduced from 90px to 9px (10%) */
    margin: 1px 0; /* Reduced from 10px to 1px (10%) */
    border: 1px solid var(--bs-gray-700);
    position: relative;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.7em;
    color: var(--bs-gray-500);
    text-transform: uppercase;
}

/* Sidebar ad styling */
.sticky-top {
    position: sticky !important;
    top: 20px !important;
}

/* Responsive ad styling */
@media (max-width: 768px) {
    .ad-container {
        min-height: 6px; /* Reduced from 60px to 6px (10%) */
    }
}

@media (max-width: 991px) {
    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }
}

/* AdSense specific styling */
.adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-height: 6px !important; /* Reduced from 60px to 6px (10%) */
    background-color: var(--bs-gray-800) !important;
    border-radius: 4px !important;
}

/* Sidebar ads - taller for vertical display */
.col-lg-2 .adsbygoogle {
    min-height: 60px !important; /* Reduced from 600px to 60px (10%) */
}

/* General styling improvements */
#modal-content.html-view h1, 
#modal-content.html-view h2, 
#modal-content.html-view h3 {
    color: #333333 !important;
    margin-bottom: 16px !important;
}

#modal-content.html-view p {
    margin-bottom: 12px !important;
    line-height: 1.6 !important;
}

/* Make buttons and links more visible */
#modal-content.html-view button,
#modal-content.html-view input[type="button"] {
    background-color: #007bff !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
}

/* Text view styling */
#modal-content.text-view {
    background-color: var(--bs-gray-900);
    color: var(--bs-body-color);
    white-space: pre-wrap;
    font-family: monospace;
    padding: 15px;
}

#modal-content img {
    max-width: 100%;
    height: auto;
}

/* Copy button animation */
.btn-outline-secondary:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

/* Custom badge styling */
.badge {
    font-size: 0.75em;
}

/* Improved form styling */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Better spacing for email items */
.email-item:last-child {
    margin-bottom: 0;
}

/* Loading indicator */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast improvements */
.toast {
    --bs-toast-bg: var(--bs-gray-800);
    --bs-toast-border-color: var(--bs-gray-700);
}

.toast-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
}
