/**
 * Mundo Dependencia Rental Manager - Frontend CSS MEJORADO
 * Versión Visual Actualizada
 */

/* ===== MODAL BASE ===== */
.md-rental-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-rental-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.md-rental-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-rental-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.md-rental-modal-close:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

/* ===== CONTAINER ===== */
.md-rental-checkout-container {
    padding: 40px;
}

.md-rental-checkout-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #f0f0f0;
}

.md-rental-checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.md-rental-selected-product-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.md-rental-selected-product-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.md-rental-selected-product-code {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ===== PROGRESS BAR ===== */
.md-rental-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 0 20px;
}

.md-rental-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.md-rental-progress-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
}

.md-rental-progress-label {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
    transition: all 0.3s ease;
}

.md-rental-progress-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    margin: 0 15px;
    position: relative;
    top: -20px;
    transition: all 0.3s ease;
}

.md-rental-progress-active .md-rental-progress-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.md-rental-progress-active .md-rental-progress-label {
    color: #667eea;
}

.md-rental-progress-completed .md-rental-progress-number {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.md-rental-progress-completed .md-rental-progress-label {
    color: #4caf50;
}

.md-rental-progress-completed~.md-rental-progress-line {
    background: #4caf50;
}

/* ===== STEP CONTAINERS ===== */
.md-rental-form-step-container {
    display: none;
}

.md-rental-form-step-container.md-rental-step-active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-rental-step-icon {
    font-size: 32px;
    margin-right: 15px;
}

/* ===== PASOS DEL FORMULARIO ===== */
.md-rental-form-step {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.md-rental-form-step:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.md-rental-form-step-optional {
    border-style: dashed;
    background: #fafbfc;
}

.md-rental-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.md-rental-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.md-rental-step-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* ===== FORM ELEMENTS ===== */
.md-rental-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .md-rental-form-row {
        grid-template-columns: 1fr;
    }
}

.md-rental-form-group {
    display: flex;
    flex-direction: column;
}

.md-rental-form-full {
    grid-column: 1 / -1;
}

.md-rental-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.md-rental-form-group input[type="text"],
.md-rental-form-group input[type="tel"],
.md-rental-form-group input[type="email"],
.md-rental-form-group input[type="date"],
.md-rental-form-group select,
.md-rental-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.md-rental-form-group input:focus,
.md-rental-form-group select:focus,
.md-rental-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.md-rental-form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== FILE INPUT ===== */
.md-rental-file-input-wrapper {
    position: relative;
}

.md-rental-file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.md-rental-file-label {
    display: block;
    padding: 12px 20px;
    background: #fff;
    border: 2px dashed #667eea;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
    font-weight: 600;
}

.md-rental-file-label:hover {
    background: #f0f4ff;
    border-color: #764ba2;
}

.md-rental-upload-preview {
    margin-top: 10px;
    min-height: 30px;
}

.md-rental-uploading {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.md-rental-upload-success {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.md-rental-upload-error {
    background: #f8d7da;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

/* ===== INFO BOX ===== */
.md-rental-info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    color: #1565c0;
}

/* ===== INFO CALCULATED ===== */
.md-rental-info-calculated {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.md-rental-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.md-rental-info-row:last-child {
    border-bottom: none;
}

.md-rental-info-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.md-rental-info-value {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

/* ===== RADIO CARDS ===== */
.md-rental-guarantee-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .md-rental-guarantee-options {
        grid-template-columns: 1fr;
    }
}

.md-rental-radio-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.md-rental-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.md-rental-radio-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.md-rental-radio-card:hover .md-rental-radio-content {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.md-rental-radio-card input:checked~.md-rental-radio-content {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.md-rental-radio-icon {
    font-size: 32px;
}

.md-rental-radio-content strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.md-rental-radio-content small {
    display: block;
    color: #666;
    font-size: 12px;
}

/* ===== PRICE SUMMARY ===== */
.md-rental-price-summary-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.md-rental-price-summary-container h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
}

.md-rental-price-summary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
}

.md-rental-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.md-rental-summary-line:last-child {
    border-bottom: none;
}

.md-rental-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0 0 0;
    margin-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 20px;
}

/* ===== BUTTONS ===== */
.md-rental-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.md-rental-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.md-rental-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.md-rental-btn-primary:active {
    transform: translateY(0);
}

.md-rental-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.md-rental-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.md-rental-btn-large {
    width: 100%;
    padding: 18px;
    font-size: 18px;
}

.md-rental-btn-submit {
    margin-top: 20px;
}

.md-rental-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MESSAGES ===== */
#md-rental-form-messages {
    margin: 20px 0;
}

.md-rental-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
}

.md-rental-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f44336;
}

.md-rental-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ff9800;
}

.md-rental-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.md-rental-alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* ===== SHIPPING RESULT ===== */
#md-rental-shipping-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #4caf50;
}

.md-rental-shipping-details p {
    margin: 10px 0;
    font-size: 15px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .md-rental-checkout-container {
        padding: 25px 20px;
    }

    .md-rental-checkout-title {
        font-size: 24px;
    }

    .md-rental-step-header h3 {
        font-size: 18px;
    }

    .md-rental-progress {
        padding: 0 10px;
    }

    .md-rental-progress-line {
        margin: 0 8px;
    }

    .md-rental-progress-label {
        font-size: 10px;
    }
}

/* ===== FORM NAVIGATION ===== */
.md-rental-form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.md-rental-form-navigation .md-rental-btn {
    flex: 1;
}

.md-rental-input-error {
    border-color: #f44336 !important;
    animation: shake 0.3s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}