/*
 * Advanced Text Encoder/Decoder - Scoped Styles for WordPress
 */
.mt-ted-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.mt-ted-wrapper {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    line-height: 1.6;
}
.mt-ted-wrapper .mt-ted-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    background: #ffffff;
    border-radius: 20px;
    position: relative;
    border: 3px solid #d1d5db; /* default gray border */
    transition: all 0.3s ease;
    background-origin: border-box;
    background-clip: padding-box, border-box;
}
@media (max-width: 768px) {
  .mt-ted-wrapper .mt-ted-container {
    padding: 0px 0px; /* Ya 0 bhi kar sakte ho agar bilkul remove chahte ho */
  }
}


/* ✅ Gradient Border on Hover Only */
.mt-ted-wrapper .mt-ted-container:hover {
    border: 3px solid transparent; /* remove solid so gradient shows */
    background: 
        linear-gradient(#ffffff, #ffffff) padding-box, /* white content area */
        linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899) border-box; /* gradient border */
}



.mt-ted-wrapper .mt-ted-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}
.mt-ted-wrapper .mt-ted-glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.mt-ted-wrapper .mt-ted-header {
    text-align: center;
    padding: 2rem 0;
}
.mt-ted-wrapper .mt-ted-header-icon {
    font-size: 4rem;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mt-ted-float 3s ease-in-out infinite;
}
.mt-ted-wrapper .mt-ted-header-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
}
.mt-ted-wrapper .mt-ted-header-description {
    color: #6b7280;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.mt-ted-wrapper .mt-ted-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
    backdrop-filter: blur(10px);
}
.mt-ted-wrapper .mt-ted-tabs-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1rem;
}
@media (min-width: 768px) {
    .mt-ted-wrapper .mt-ted-tabs-nav {
        grid-template-columns: repeat(4, 1fr);
    }
}
.mt-ted-wrapper .mt-ted-tab-button {
    padding: 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    background: none;
    border: 2px solid #cbd5e1; /* Light slate border */
    border-radius: 12px;
    cursor: pointer;
    color: #64748b !important;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mt-ted-wrapper .mt-ted-tab-button:hover {
    color: #475569 !important;
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.2);
}
.mt-ted-wrapper .mt-ted-tab-button.active {
    color: #1e293b !important;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border-color: #3b82f6;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}
.mt-ted-wrapper .mt-ted-control-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
}
.mt-ted-wrapper .mt-ted-auto-convert {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    padding: 1rem;
    border-radius: 12px;
}
.mt-ted-wrapper .mt-ted-direction-selector {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    padding: 1rem;
    border-radius: 12px;
    flex-direction: row; /* Desktop default */
}

/* Mobile view: stack vertically */
@media (max-width: 768px) {
    .mt-ted-wrapper .mt-ted-direction-selector {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.mt-ted-wrapper .mt-ted-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.mt-ted-wrapper .mt-ted-radio-option:hover {
    background: rgba(255, 255, 255, 0.7);
}
.mt-ted-wrapper .mt-ted-radio-option.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}
.mt-ted-wrapper .mt-ted-radio-option input[type="radio"] {
    margin: 0;
}
.mt-ted-wrapper .mt-ted-radio-option label {
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.mt-ted-wrapper .mt-ted-conversion-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (min-width: 1024px) {
    .mt-ted-wrapper .mt-ted-conversion-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mt-ted-wrapper .mt-ted-control-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}
.mt-ted-wrapper .mt-ted-panel {
    background: rgba(249, 250, 251, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(229, 231, 235, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
}
.mt-ted-wrapper .mt-ted-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.mt-ted-wrapper .mt-ted-panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mt-ted-wrapper .mt-ted-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid rgba(229, 231, 235, 0.5);
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(249, 250, 251, 0.8);
    backdrop-filter: blur(10px);
    resize: vertical;
    transition: all 0.3s ease;
}
.mt-ted-wrapper .mt-ted-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.9);
}
.mt-ted-wrapper .mt-ted-textarea[readonly] {
    background: rgba(241, 245, 249, 0.8);
}
.mt-ted-wrapper .mt-ted-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.mt-ted-wrapper .mt-ted-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* ✅ Mobile: Smaller button size */
@media (max-width: 768px) {
    .mt-ted-wrapper .mt-ted-btn-primary {
        padding: 0.4rem 0.9rem;
        font-size: 0.875rem;
        border-radius: 6px;
    }
}

.mt-ted-wrapper .mt-ted-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.mt-ted-wrapper .mt-ted-btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border-radius: 8px;
}

.mt-ted-wrapper .mt-ted-btn-secondary:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ✅ Mobile: Make button smaller */
@media (max-width: 768px) {
    .mt-ted-wrapper .mt-ted-btn-secondary {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
        border-radius: 6px;
    }
}



.mt-ted-wrapper .mt-ted-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    padding: 0.75rem;
    border-radius: 8px;
}
.mt-ted-wrapper .mt-ted-error {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #dc2626;
    margin-top: 1rem;
}
.mt-ted-wrapper .mt-ted-info-panel {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(239, 246, 255, 0.8);
    border: 1px solid rgba(219, 234, 254, 0.3);
    border-radius: 12px;
}
.mt-ted-wrapper .mt-ted-info-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mt-ted-wrapper .mt-ted-info-content {
    color: #1e3a8a;
    line-height: 1.6;
}
@keyframes mt-ted-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.mt-ted-wrapper .mt-ted-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.mt-ted-wrapper .mt-ted-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.mt-ted-wrapper .mt-ted-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 28px;
}
.mt-ted-wrapper .mt-ted-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
.mt-ted-wrapper input:checked + .mt-ted-slider {
    background-color: #3b82f6;
}
.mt-ted-wrapper input:checked + .mt-ted-slider:before {
    transform: translateX(22px);
}
@media (max-width: 768px) {
    .mt-ted-wrapper .mt-ted-container { padding: 0.5rem; }
    .mt-ted-wrapper .mt-ted-header-title { font-size: 2rem; }
    .mt-ted-wrapper .mt-ted-tabs-nav { padding: 0.5rem; gap: 0.5rem; }
    .mt-ted-wrapper .mt-ted-tab-button { padding: 0.75rem 1rem; font-size: 0.8rem; }
    .mt-ted-wrapper .mt-ted-control-panel { padding: 1rem; }
    .mt-ted-wrapper .mt-ted-panel { padding: 1rem; }
    .mt-ted-wrapper .mt-ted-textarea { min-height: 150px; font-size: 0.8rem; }
}