/**
 * MeroSath Tools & Utilities Stylesheet
 * Responsive, clean aesthetic designed for Newspaper theme integration
 */

/* Wrapper & Layout */
.mre-tools-wrapper {
    padding: 30px 15px 60px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background: #f8fafc;
    min-height: 80vh;
}

.mre-tools-wrapper .td-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* Breadcrumbs */
.mre-tools-breadcrumbs {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 25px;
}
.mre-tools-breadcrumbs a {
    color: #0284c7;
    text-decoration: none;
}
.mre-tools-breadcrumbs a:hover {
    text-decoration: underline;
}
.mre-tools-breadcrumbs .sep {
    margin: 0 8px;
    color: #94a3b8;
}
.mre-tools-breadcrumbs .current {
    color: #334155;
    font-weight: 600;
}

/* Headers */
.mre-tools-hero, .mre-tool-page-header {
    text-align: center;
    margin-bottom: 35px;
}
.mre-tools-hero-title, .mre-tool-page-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 12px 0 10px 0;
    line-height: 1.3;
}
.mre-tools-hero-subtitle, .mre-tool-page-subtitle {
    font-size: 16px;
    color: #64748b;
    max-width: 780px;
    margin: 0 auto 15px auto;
    line-height: 1.6;
}

/* Badges & Chips */
.mre-tools-hero-badge, .mre-tool-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mre-tool-badge.privacy {
    background: #dcfce7;
    color: #15803d;
}
.mre-rate-date-chip, .mre-privacy-chip {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mre-rate-date-chip .sep {
    margin: 0 10px;
    color: #cbd5e1;
}

/* Landing Page Grid */
.mre-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.mre-tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.mre-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}
.mre-tool-icon {
    font-size: 42px;
    margin-bottom: 15px;
}
.mre-tool-card .mre-tool-badge {
    align-self: flex-start;
    margin-bottom: 12px;
}
.mre-tool-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
}
.mre-tool-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}
.mre-tool-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 13px;
    color: #334155;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}
.mre-tool-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0284c7;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background 0.2s;
}
.mre-tool-btn:hover {
    background: #0369a1;
}

/* Security Banner */
.mre-tools-security-banner {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.mre-tools-security-banner .sec-icon {
    font-size: 36px;
}
.mre-tools-security-banner h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.mre-tools-security-banner p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

/* Calculator Card */
.mre-calc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 35px 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.mre-calc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
    flex: 1;
}
.mre-calc-field label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}
.mre-input-large, .mre-select-large {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.mre-input-large:focus, .mre-select-large:focus {
    outline: none;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2,132,199,0.15);
}

/* FX Row & Swap */
.mre-fx-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}
.mre-swap-wrap {
    margin-bottom: 15px;
}
.mre-swap-btn {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: #0284c7;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.mre-swap-btn:hover {
    background: #e0f2fe;
    transform: rotate(180deg);
}

/* Result Box */
.mre-fx-result-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin: 25px 0 20px 0;
}
.mre-res-header {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.mre-res-main {
    font-size: 28px;
    font-weight: 800;
    color: #0c4a6e;
    margin-bottom: 8px;
    line-height: 1.3;
}
.mre-res-main .highlight {
    color: #0284c7;
}
.mre-res-sub {
    font-size: 14px;
    color: #475569;
}
.mre-res-details {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
}

/* Indicative Notice */
.mre-indicative-notice {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
    margin-top: 20px;
}
.mre-indicative-notice .notice-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Rates Table */
.mre-rates-table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}
.mre-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.mre-table-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.mre-table-search input {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    min-width: 240px;
}
.mre-table-responsive {
    overflow-x: auto;
}
.mre-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.mre-table th, .mre-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.mre-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
}
.mre-table .flag {
    margin-right: 8px;
    font-size: 18px;
}
.mre-table .iso-badge {
    background: #f1f5f9;
    color: #334155;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}
.mre-table .rate-buy {
    color: #166534;
    font-weight: 700;
}
.mre-table .rate-sell {
    color: #1e40af;
    font-weight: 700;
}
.mre-btn-quick-calc {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #0284c7;
    cursor: pointer;
    transition: all 0.2s;
}
.mre-btn-quick-calc:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Tabs */
.mre-tabs-container {
    margin-bottom: 40px;
}
.mre-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}
.mre-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, background 0.2s;
}
.mre-tab-btn.active {
    color: #0284c7;
    border-bottom: 3px solid #0284c7;
    background: #f0f9ff;
}

/* Direction Toggles & Pills */
.mre-direction-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.mre-radio-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}
.mre-radio-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.mre-radio-pill input {
    margin-right: 8px;
}

/* Date Form Inputs */
.mre-date-inputs-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mre-calc-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mre-submit-tool-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.mre-submit-tool-btn:hover {
    background: #0369a1;
}
.mre-submit-tool-btn.btn-lg {
    padding: 15px 32px;
    font-size: 16px;
}
.mre-link-tool-btn {
    background: none;
    border: none;
    color: #0284c7;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.mre-link-tool-btn.text-danger {
    color: #dc2626;
}

/* Age Stats Grid */
.mre-age-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}
.mre-age-stat-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.mre-age-stat-card .stat-icon {
    font-size: 26px;
    margin-bottom: 6px;
}
.mre-age-stat-card .stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}
.mre-age-stat-card .stat-val {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/* Dropzone (Images to PDF) */
.mre-dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}
.mre-dropzone:hover, .mre-dropzone.dragover {
    border-color: #0284c7;
    background: #f0f9ff;
}
.mre-drop-icon {
    font-size: 52px;
    margin-bottom: 12px;
}
.mre-drop-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.mre-drop-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}
.mre-btn-browse {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Queue Actions Strip */
.mre-queue-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 15px;
}
.queue-count {
    font-size: 15px;
    color: #334155;
}
.queue-actions {
    display: flex;
    gap: 15px;
}

/* Thumbnails Grid */
.mre-img-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.mre-thumb-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15,23,42,0.8);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.btn-remove-thumb {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220,38,38,0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}
.thumb-img-wrap {
    width: 100%;
    height: 140px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.thumb-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.thumb-meta {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
}
.thumb-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #334155;
}
.thumb-reorder-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}
.thumb-reorder-bar button {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 28px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
}
.thumb-reorder-bar button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.reorder-label {
    font-size: 11px;
    color: #64748b;
}

/* PDF Options Card */
.mre-pdf-options-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}
.mre-pdf-options-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.mre-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.mre-convert-action-wrap {
    text-align: center;
    padding-top: 10px;
}

/* Progress Bar */
.mre-pdf-progress {
    margin-top: 20px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.progress-bar-track {
    background: #e2e8f0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar-fill {
    background: #0284c7;
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}
.progress-status {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* Cross Links Strip */
.mre-other-tools-strip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 25px;
}
.mre-other-tools-strip h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}
.mre-other-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.mre-other-links a {
    color: #0284c7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.mre-other-links a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mre-tools-hero-title, .mre-tool-page-title {
        font-size: 24px;
    }
    .mre-fx-row {
        flex-direction: column;
        align-items: stretch;
    }
    .mre-swap-wrap {
        align-self: center;
        margin: 5px 0;
    }
    .mre-date-inputs-row {
        flex-direction: column;
        gap: 10px;
    }
    .mre-calc-card {
        padding: 20px 15px;
    }
}
