﻿/* Editable Fields Styles */
.editable-field-container {
    position: relative;
    margin-bottom: 15px;
}

.editable-label {
    margin-bottom: 2px;
    color: #9fa1a3;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editable-content-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
}

.editable-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #9fa1a3;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    z-index: 2;
}

.editable-field-container:hover .editable-icon {
    opacity: 1;
}

.editable-value {
    margin-bottom: 2px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    position: relative;
    flex: 1;
    min-height: 24px;
    padding: 2px 20px 2px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    word-break: break-word;
}

    .editable-value:hover {
        background-color: #f8f9fa;
        padding-left: 8px;
    }

    .editable-value.editing {
        background-color: #fff;
        border: 2px solid #007bff;
        padding: 8px;
        margin: -2px 0;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .editable-value.readonly {
        cursor: default;
        padding-right: 0;
    }

        .editable-value.readonly:hover {
            background-color: transparent;
            padding-left: 0;
        }

.editable-currency-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
}

.editable-currency {
    margin-bottom: 2px;
    margin-right: 4px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.editable-separator {
    margin-top: 8px;
    margin-bottom: 0;
    border-color: #e9ecef;
}

/* Input styling when editing */
.editable-input {
    width: 100%;
    border: 2px solid #007bff;
    border-radius: 4px;
    padding: 8px;
    font-size: 16px;
    font-weight: 500;
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

    .editable-input:focus {
        border-color: #0056b3;
        box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
    }

/* Loading and status indicators */
.editable-loading {
    opacity: 0.6;
    pointer-events: none;
}

    .editable-loading::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        border: 2px solid #f3f3f3;
        border-top: 2px solid #007bff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

.editable-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.editable-error {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .editable-value {
        font-size: 14px;
    }

    .editable-currency {
        font-size: 14px;
    }

    .editable-label {
        font-size: 11px;
    }
}
