/* Mobi-Roll Mietverlängerung Frontend */

.mrm-ext {
    max-width: 540px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

/* Titles & Description */
.mrm-ext__title {
    margin: 0 0 8px;
    font-size: 1.4em;
    font-weight: 700;
    color: #1f2937;
}

.mrm-ext__desc {
    margin: 0 0 24px;
    font-size: 0.95em;
    color: #6b7280;
    line-height: 1.5;
}

/* Form Fields */
.mrm-ext__field {
    margin-bottom: 16px;
}

.mrm-ext__field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
    color: #374151;
}

.mrm-ext__field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.mrm-ext__field input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mrm-ext__field input[type="text"]::placeholder {
    color: #9ca3af;
}

/* Buttons */
.mrm-ext__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    width: 100%;
    box-sizing: border-box;
}

.mrm-ext__btn--primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.mrm-ext__btn--primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.mrm-ext__btn--outline {
    background: transparent;
    color: #6b7280;
    border-color: #e5e7eb;
    margin-top: 16px;
    font-size: 0.9em;
}

.mrm-ext__btn--outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

/* Rental Card */
.mrm-ext__rental-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.mrm-ext__card-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.95em;
    color: #374151;
    line-height: 1.4;
}

.mrm-ext__card-row:first-child {
    font-size: 1.05em;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.mrm-ext__card-row span:first-child {
    color: #6b7280;
    min-width: 80px;
    flex-shrink: 0;
}

/* Status Badges */
.mrm-ext__status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.mrm-ext__status--active {
    background: #dcfce7;
    color: #166534;
}

.mrm-ext__status--extended {
    background: #dbeafe;
    color: #1e40af;
}

.mrm-ext__status--overdue {
    background: #fef2f2;
    color: #991b1b;
}

/* Extend Form */
.mrm-ext__extend-form {
    margin-bottom: 16px;
}

.mrm-ext__extend-form > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9em;
    color: #374151;
}

.mrm-ext__weeks-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.mrm-ext__select {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    color: #1f2937;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mrm-ext__select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mrm-ext__price {
    font-size: 1.2em;
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}

/* Messages */
.mrm-ext__msg {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}

.mrm-ext__msg--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.mrm-ext__msg--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mrm-ext__msg--success a {
    color: #059669;
    font-weight: 600;
    text-decoration: underline;
}

.mrm-ext__msg--success a:hover {
    color: #047857;
}

/* Loading Overlay */
.mrm-ext__loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.mrm-ext__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: mrm-ext-spin 0.7s linear infinite;
}

@keyframes mrm-ext-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .mrm-ext {
        padding: 0 4px;
    }

    .mrm-ext__title {
        font-size: 1.2em;
    }

    .mrm-ext__rental-card {
        padding: 16px;
    }

    .mrm-ext__weeks-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mrm-ext__price {
        text-align: center;
    }
}
