/* Modal Base Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #1a2436;
    padding: 2.5rem;
    border-radius: 12px;
    min-width: 400px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    color: #FFD600;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Modal Form Elements */
.modal-form {
    margin-bottom: 1.5rem;
}

.modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background: #243447;
    border: 1px solid #334a66;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-input:focus {
    outline: none;
    border-color: #FFD600;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

/* Modal Sharing Section */
.share-section {
    margin-bottom: 1.5rem;
}

.share-type-selector {
    margin-bottom: 1rem;
}

.share-type-label {
    display: block;
    color: #fff;
    margin-bottom: 0.5rem;
}

.share-type-select {
    width: 100%;
    padding: 12px;
    background: #243447;
    border: 1px solid #334a66;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

/* User/Group Selection */
.share-recipients {
    margin-bottom: 1rem;
}

.recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.recipient-tag {
    background: #334a66;
    padding: 6px 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.recipient-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 2rem;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-btn.primary {
    background: #FFD600;
    color: #101622;
}

.modal-btn.primary:hover {
    background: #ffed4a;
    transform: translateY(-1px);
}

.modal-btn.secondary {
    background: #334a66;
    color: #fff;
}

.modal-btn.secondary:hover {
    background: #425b7d;
    transform: translateY(-1px);
}

.modal-btn.danger {
    background: #ff4444;
    color: #fff;
}

.modal-btn.danger:hover {
    background: #ff6666;
    transform: translateY(-1px);
}

/* Permission List */
.permission-list {
    margin: 1rem 0;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #243447;
    border-radius: 8px;
    margin-bottom: 8px;
}

.permission-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.permission-user {
    color: #fff;
    font-weight: 500;
}

.permission-type {
    color: #9ca3af;
    font-size: 0.9rem;
}

.permission-actions {
    display: flex;
    gap: 8px;
}

/* Loading State */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #243447;
    border-top: 4px solid #FFD600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}