/* Domain Results Container */
.s3-domain-results-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Container for results view */
.s3-results-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Search Input */
.s3-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    transition: all 0.2s;
    margin-top: 10px;
}

.s3-search-input:focus {
    border-color: #4299e1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* TLD Container */
.s3-tld-selector {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.s3-tld-top-section {
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f4f8;
}

.s3-tld-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  max-height: 300px; /* <--- smaller so a scrollbar definitely appears */
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  position: relative;
}

/* TLD Tags */
.s3-tld-tag {
    display: inline-flex;
    align-items: center;
    background: #ebf5ff;
    color: #2b6cb0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    border: 1px solid #bde0fe;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    transform: none !important;
}

.s3-tld-tag:hover:not(.opacity-50) {
    background: #bde0fe;
    transform: none !important;
}

.s3-tld-tag.active {
    background: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
    transform: none !important;
}

.s3-tld-tag.opacity-50 {
    pointer-events: none;
}

/* Loading indicator */
.s3-loading-indicator {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    text-align: center;
    background: linear-gradient(to top, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0) 100%);
    color: #6b7280;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 1;
}

.s3-loading-indicator i {
    color: #3b82f6;
}

/* Error message in TLD selector */
.s3-error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #fee2e2;
  color: #b91c1c;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  text-align: center;
  border: 1px solid #fecaca;
  width: 100%;
}

.s3-error-message i {
  margin-right: 8px;
  font-size: 16px;
}

/* Empty message in TLD selector */
.s3-empty-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #f3f4f6;
  color: #6b7280;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  text-align: center;
  border: 1px solid #e5e7eb;
  width: 100%;
}

/* Generate button */
.s3-generate-button {
    width: 100%;
    padding: 12px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
    margin-top: auto;
    transform: none !important;
}

.s3-generate-button:hover {
    background: #38a169;
    transform: none !important;
}

/* Loading State */
.s3-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: #4a5568;
    height: 100%;
}

/* Results Grid */
.s3-results-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 16px;
    max-height: 400px;
    min-height: 0;
}

.s3-domain-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 8px;
}

/* Domain Cards - Updated with improved styling */
.s3-domain-card {
    background-color: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible; /* Allow badge to overflow */
    transform: none !important;
}

/* Scratchbox badge styles */
.s3-scratchbox-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #3b82f6;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    white-space: nowrap;
}

.s3-scratchbox-badge i {
    font-size: 0.8rem;
}

.s3-domain-card:hover {
    border-color: #34d399;
    background-color: #d1fae5;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Styles for domain cards in scratchbox */
.s3-domain-card.in-scratchbox {
    background-color: #dbeafe; /* Lighter blue background */
    border-color: #3b82f6; /* Brighter blue border */
    border-left: 4px solid #2563eb; /* Left border indicator */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); /* More visible glow effect */
    transform: none !important; /* Slight elevation */
}

.s3-domain-card.in-scratchbox:hover {
    border-color: #2563eb;
    background-color: #bfdbfe;
    border-left: 4px solid #1d4ed8;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
    transform: none !important;
}

.s3-domain-card.in-scratchbox .s3-domain-name {
    color: #1e40af;
    position: relative;
    padding-left: 20px; /* Make space for the indicator */
}

/* Visual indicator for selected domains */
.s3-domain-card.in-scratchbox .s3-domain-name::before {
    content: "\f058"; /* Check circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #2563eb;
    font-size: 0.9rem;
}

.s3-domain-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.s3-domain-name {
    font-size: 14px;
    font-weight: 500;
    color: #065f46;
    flex-grow: 1;
}

.s3-availability-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #a7f3d0;
    color: #065f46;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.s3-domain-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid #6ee7b7;
}

.s3-action-button {
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: 14px;
    transform: none !important;
}

.s3-action-button.s3-action-add {
    background-color: #a7f3d0;
    color: #065f46;
}

.s3-action-button.s3-action-add:hover {
    background-color: #6ee7b7;
    transform: none !important;
}

.s3-domain-card.in-scratchbox .s3-action-button.s3-action-add {
    background-color: #bfdbfe;
    color: #1e40af;
    cursor: not-allowed;
    opacity: 0.7;
}

.s3-domain-card.in-scratchbox .s3-domain-actions {
    border-top-color: #93c5fd;
}

.s3-action-button.s3-action-register {
    background-color: #f1f5f9;
    color: #475569;
}

.s3-action-button.s3-action-register:hover {
    background-color: #e2e8f0;
    color: #1e293b;
    transform: none !important;
}

/* Back Button */
.s3-back-button {
    font-size: 14px;
    color: #4a5568;
    padding: 8px 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transform: none !important;
}

.s3-back-button:hover {
    background: #f7fafc;
    color: #2d3748;
    border-color: #cbd5e1;
    transform: none !important;
}

/* Make sure the header has border */
.s3-results-header {
    position: relative;
    top: auto;
    z-index: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f4f8 !important;
}

/* Scrollbar Styling */
.s3-results-scroll-area::-webkit-scrollbar,
.s3-tld-container::-webkit-scrollbar {
    width: 12px;
}

.s3-results-scroll-area::-webkit-scrollbar-track,
.s3-tld-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.s3-results-scroll-area::-webkit-scrollbar-thumb,
.s3-tld-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
    border: 3px solid #f1f5f9;
    min-height: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .s3-domain-results-grid {
        grid-template-columns: 1fr;
    }

    .s3-domain-card {
        margin: 6px 0;
    }

    .s3-back-button {
        width: auto;
    }
    
    .s3-search-input {
        font-size: 13px;
    }
}

/* Enhanced notification styles */
.s3-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    min-width: 300px;
    max-width: 80%;
    border-left: 5px solid;
}

.s3-notification-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.s3-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.s3-notification i {
    font-size: 1.2rem;
}

/* Success notification - Green */
.s3-notification-success {
    background-color: #10b981; /* Emerald 600 */
    border-left-color: #059669; /* Emerald 700 */
}

/* Warning notification - Amber */
.s3-notification-warning {
    background-color: #f59e0b; /* Amber 500 */
    border-left-color: #d97706; /* Amber 600 */
}

/* Info notification - Blue */
.s3-notification-info {
    background-color: #3b82f6; /* Blue 500 */
    border-left-color: #2563eb; /* Blue 600 */
}

/* Error notification - Red */
.s3-notification-error {
    background-color: #ef4444; /* Red 500 */
    border-left-color: #dc2626; /* Red 600 */
}

/* Ensure notifications are visible on mobile */
@media (max-width: 640px) {
    .s3-notification {
        min-width: 90%;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Improved styling for locked domain cards */
.s3-domain-card.locked {
    background-color: #e7f0ff !important; /* Lighter blue background */
    border: 1px solid #a3bffa !important; /* Lighter border */
    border-left: 4px solid #667eea !important; /* Left accent border */
    opacity: 0.98; /* Less transparent */
    transform: none !important;
    position: relative;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
    transition: all 0.3s ease;
}

/* Container for locked indicators */
.locked-indicators {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Redesigned badge */
.locked-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #667eea;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 4px;
}

.locked-badge i {
    font-size: 0.8rem;
}

/* Improved overlay */
.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    background-color: rgba(102, 126, 234, 0.85);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Checkmark icon styling */
.s3-domain-card.locked .s3-domain-name {
    position: relative;
    padding-left: 22px;
    color: #4339ca;
    font-weight: 600;
}

.s3-domain-card.locked .s3-domain-name:before {
    content: "\f058"; /* Check circle icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #4339ca;
    font-size: 1rem;
}

/* Add button styling when locked */
.s3-domain-card.locked .s3-action-button.s3-action-add {
    background-color: #ddd6fe;
    color: #6366f1;
    cursor: not-allowed;
    opacity: 0.8;
}

.s3-domain-card.locked .s3-action-button.s3-action-add i:before {
    content: "\f00c"; /* Change to checkmark */
}

/* Subtle line dividing content from actions */
.s3-domain-card.locked .s3-domain-actions {
    border-top: 1px solid #c7d2fe;
}

/* Hover effect for locked cards */
.s3-domain-card.locked:hover {
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.2);
    transform: none !important;
}

/* Style for the availability tag when domain is in scratchbox */
.s3-domain-card.locked .s3-availability-tag {
    background-color: #e0e7ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

/* Change icon color in the tag */
.s3-domain-card.locked .s3-availability-tag i {
	margin-right: 6px; /* Keep consistent with the spacing above */
    color: #4f46e5;
}

.s3-availability-tag i {
    margin-right: 6px; /* Increase this value for more spacing */
}

/* Fix for the double border - remove the second border */
.s3-tld-top-section {
    margin-bottom: 1rem;
    border-bottom: none; /* Remove the border here */
}

/* Updated styling for the TLD container to match the design */
.s3-tld-container {
    border-top: none;
    margin-top: -12px; /* Adjust as needed */
}

/* Enhance loading animation */
.loading-pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Style improvement for notification */
.s3-notification {
    font-weight: 500;
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* More prominent styling for the selected TLD */
.s3-tld-tag.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
    transform: none !important;
}

/* Better hover effect */
.s3-tld-tag:hover:not(.active) {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: none !important;
}

/* Step 3 border fix - make sure the step-box has proper border and styling */
.step-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    height: 605px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

/* Only remove the "Checking domain combinations" notification */
/* Instead of hiding all notifications, let's hide only the checking message by targeting with more specificity */
.s3-notification:contains("Checking") {
    display: none !important;
}

/* Secret Mode Styles - Added to step3.css instead of index.html */
.secret-mode-hint {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffeb3b;
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: bold;
    animation: pulse-hint 2s infinite;
}



/* Disabled states for dropdowns during loading */
select:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Loading indicators in textareas */
.word-textbox.loading {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

/* Add these styles to your step3.css file */

/* Updated notification styles to support stacking */
.s3-notification {
    position: fixed;
    /* bottom: 20px; - Remove this line as we'll set it dynamically */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease-out, bottom 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    min-width: 300px;
    max-width: 80%;
    border-left: 5px solid;
}

.s3-notification-show {
    opacity: 1;
}

.s3-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

/* Secret mode category styles */
.secret-mode-disabled-select {
    opacity: 0.85 !important;
    pointer-events: none !important;
    user-select: none !important;
    background-color: #f0f4f8 !important;
    color: #4a5568 !important;
    border: 2px solid #e2e8f0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Prevent arrow from showing in secret mode */
.secret-mode-disabled-select + .select-wrapper::after {
    display: none !important;
}