/* ─── Container ──────────────────────────────────────────────── */
.mtls-main-container {
    max-width: 560px;
    margin: auto;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
    border: 1px solid #ddd;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

/* ─── Header ─────────────────────────────────────────────────── */
.mtls-header {
    background: #0a2540;
    color: #fff;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─── Box Content ────────────────────────────────────────────── */
.mtls-box-content {
    background: #fff;
    padding: 24px;
}

/* ─── Labels ─────────────────────────────────────────────────── */
.mtls-label {
    font-weight: 600;
    font-size: 13px;
    margin: 0 0 6px 0;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mtls-required { color: #e74c3c; font-size: 14px; }
.mtls-optional  { font-weight: normal; color: #999; font-size: 12px; }

/* ─── Row Layout ─────────────────────────────────────────────── */
.mtls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}
.mtls-col { display: flex; flex-direction: column; }

/* ─── Domain Box ─────────────────────────────────────────────── */
.mtls-domain-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 11px 14px;
    background: #f5f5f5;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.mtls-slash { color: #999; font-size: 18px; }

/* ─── Inputs ─────────────────────────────────────────────────── */
.mtls-main-container input[type="url"],
.mtls-main-container input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #222;
}
.mtls-main-container input[type="url"]:focus,
.mtls-main-container input[type="text"]:focus {
    outline: none;
    border-color: #0a7ea4;
    box-shadow: 0 0 0 3px rgba(10,126,164,0.12);
}
.mtls-main-container input[readonly] {
    background: #f0f8fb;
    color: #0a7ea4;
    font-weight: bold;
    cursor: default;
}

/* ─── Input mit Copy-Icon ────────────────────────────────────── */
.mtls-input-wrapper { position: relative; margin-bottom: 14px; }
.mtls-input-wrapper input { padding-right: 40px !important; }
.inner-copy-icon {
    position: absolute; right: 12px; top: 14px;
    cursor: pointer; color: #0a7ea4;
    transition: color 0.2s;
}
.inner-copy-icon:hover { color: #075f7c; }

/* ─── Haupt-Button ───────────────────────────────────────────── */
#mtls-btn-main {
    background: #2d8a4e;
    color: white; border: none;
    padding: 14px; width: 100%;
    border-radius: 6px; font-size: 15px;
    font-weight: bold; cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s, transform 0.1s;
}
#mtls-btn-main:hover    { background: #236e3e; }
#mtls-btn-main:active   { transform: scale(0.99); }
#mtls-btn-main:disabled { background: #aaa; cursor: not-allowed; }

/* ─── Terms ──────────────────────────────────────────────────── */
.mtls-terms {
    font-size: 12px; color: #888;
    margin-top: 12px; text-align: center; line-height: 1.6;
}
.mtls-terms a { color: #0a7ea4; text-decoration: none; }
.mtls-terms a:hover { text-decoration: underline; }

/* ─── Button Row ─────────────────────────────────────────────── */
.mtls-button-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; margin: 14px 0;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.mtls-btn-teal {
    background: #0a7ea4; color: white !important;
    border: none; padding: 10px 8px; border-radius: 6px;
    font-size: 13px; text-decoration: none; text-align: center;
    cursor: pointer; transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 5px; font-weight: 500;
}
.mtls-btn-teal:hover { background: #075f7c; }

.mtls-btn-dark {
    background: #0a2540; color: white;
    border: none; padding: 10px 8px; border-radius: 6px;
    font-size: 13px; cursor: pointer; transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
    gap: 5px; font-weight: 500;
}
.mtls-btn-dark:hover { background: #1a3a52; }

.mtls-btn-green {
    background: #2d8a4e; color: white; border: none;
    padding: 14px; width: 100%; border-radius: 6px;
    font-weight: bold; font-size: 14px; cursor: pointer;
    margin-top: 10px; transition: background 0.2s, transform 0.1s;
}
.mtls-btn-green:hover  { background: #236e3e; }
.mtls-btn-green:active { transform: scale(0.99); }
.mtls-full { width: 100%; margin-bottom: 10px; }

/* ─── QR-Code ────────────────────────────────────────────────── */
#mtls-qr-section {
    margin: 10px 0; padding: 16px;
    background: #f9f9f9; border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.mtls-qr-wrapper {
    display: flex; justify-content: center; margin-bottom: 14px;
}
#mtls-qr-code canvas,
#mtls-qr-code img { display: block; border-radius: 4px; }

/* ─── Recent Links ───────────────────────────────────────────── */
.mtls-recent-header {
    background: #0a2540; color: #fff;
    padding: 14px 16px; font-weight: bold;
    font-size: 14px; border-radius: 8px 8px 0 0;
    display: flex; align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}
.mtls-recent-item {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    border-top: none; background: #fff;
    gap: 12px; flex-wrap: wrap;
}
.mtls-recent-item:last-child { border-radius: 0 0 8px 8px; }
.mtls-recent-item:hover { background: #f8fbfc; }

.mtls-recent-info {
    display: flex; align-items: center;
    gap: 12px; flex: 1; min-width: 0;
}
.mtls-recent-favicon {
    width: 24px; height: 24px;
    border-radius: 4px; flex-shrink: 0;
}
.mtls-recent-favicon-placeholder {
    width: 24px; height: 24px; border-radius: 4px;
    background: #0a7ea4; display: flex;
    align-items: center; justify-content: center;
    color: white; font-size: 11px; flex-shrink: 0;
}
.mtls-recent-urls { min-width: 0; }
.mtls-recent-short {
    color: #0a7ea4; font-weight: bold; font-size: 14px;
    text-decoration: none; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtls-recent-short:hover { text-decoration: underline; }
.mtls-recent-long {
    color: #999; font-size: 12px; display: block;
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 200px;
}
.mtls-recent-actions { display: flex; gap: 6px; flex-shrink: 0; }

.mtls-recent-btn {
    background: #0a7ea4; color: white !important;
    border: none; padding: 7px 10px; border-radius: 5px;
    font-size: 12px; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; gap: 4px;
    transition: background 0.2s; white-space: nowrap;
}
.mtls-recent-btn:hover  { background: #075f7c; }
.mtls-recent-btn.dark   { background: #0a2540; }
.mtls-recent-btn.dark:hover { background: #1a3a52; }
.mtls-recent-btn.red    { background: #c0392b; }
.mtls-recent-btn.red:hover  { background: #a93226; }

/* ─── Fehlermeldung ──────────────────────────────────────────── */
.mtls-error {
    background: #fdecea; color: #c0392b;
    border: 1px solid #f5c6cb; border-radius: 6px;
    padding: 10px 14px; font-size: 13px; margin: 8px 0;
}

/* ─── Utility ────────────────────────────────────────────────── */
.mtls-hidden { display: none !important; }

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .mtls-box-content  { padding: 16px; }
    .mtls-row          { grid-template-columns: 1fr; }
    .mtls-button-row   { grid-template-columns: 1fr; }
    .mtls-recent-item  { flex-direction: column; align-items: flex-start; }
    .mtls-recent-actions { width: 100%; justify-content: flex-start; }
}